471,337 Members | 1,141 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Where is the collections module?

I was going to try tweaking defaultdict, but I can't for the life of me
find where the collections module or its structures are defined. Python 2.5.
Jul 22 '07 #1
4 1452
Look in Modules/_collectionsmodule.c

Pretty much any built-in module will be named thusly.

On 7/22/07, Gordon Airporte <JH*****@fbi.govwrote:
I was going to try tweaking defaultdict, but I can't for the life of me
find where the collections module or its structures are defined. Python 2.5.
--
http://mail.python.org/mailman/listinfo/python-list

--
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://ironfroggy-code.blogspot.com/
Jul 22 '07 #2
On Sun, 2007-07-22 at 14:24 -0400, Gordon Airporte wrote:
I was going to try tweaking defaultdict, but I can't for the life of me
find where the collections module or its structures are defined. Python 2.5.
It's written in C. You'll find it in the Python2.5 source code
at /path/to/source/Modules/collectionsmodule.c

--
Carsten Haese
http://informixdb.sourceforge.net
Jul 22 '07 #3
Gordon Airporte wrote:
I was going to try tweaking defaultdict, but I can't for the life of me
find where the collections module or its structures are defined. Python
2.5.
Thanks all. I was expecting it in Python. Time to dust off my C :-P
Jul 23 '07 #4
On 7/22/07, Gordon Airporte <JH*****@fbi.govwrote:
Gordon Airporte wrote:
I was going to try tweaking defaultdict, but I can't for the life of me
find where the collections module or its structures are defined. Python
2.5.

Thanks all. I was expecting it in Python. Time to dust off my C :-P
If you'd rather work with a pure python implementation, Jason Kirtland
has written one on the Python Cookbook:
http://aspn.activestate.com/ASPN/Coo.../Recipe/523034

--
Jerry
Jul 23 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Gavin | last post: by
1 post views Thread by Shea Martin | last post: by
4 posts views Thread by Sid Price | last post: by
3 posts views Thread by Marco Shaw | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.