473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 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 1528
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: njp | last post by:
BlankHi, How do I create a tightly coupled Object 1 such that when I update it in one collection, it is simultaneously and automatically updated in other collections? The collections are defined...
0
by: Gavin | last post by:
I am using collections in my project and have come up against some issues. My project is a web based thin client application. The main issue I have is with collections, I have all the users...
1
by: Shea Martin | last post by:
I am getting this error in a python script: File "/usr/sfw/lib/python2.3/site-packages/BTL/cache.py", line 12, in ? from collections import deque ImportError: No module named collections ...
2
by: Kganesan | last post by:
Is there a way to take a collections object of modules and read each function and procedure and any declarations in it? I have 25 databases in Access that I need to programmatically go thru each...
1
by: Claire | last post by:
I'm writing an internal mail system module for an application. The mails are stored on a sql database that may be on a LAN or WAN. The gui has similar functionality to most email systems where...
4
by: Sid Price | last post by:
Hello, I have a class of objects (Device) that are managed by another object (Devices) with a collection class (DeviceCollection) inherited from Collections.Hashtable. Each of the Device objects...
3
by: Marco Shaw | last post by:
I've got some C# code to create a custom PowerShell cmdlet with these statements: .... using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; .... ...
3
by: fizilla | last post by:
Hello all! I have the following weird problem and since I am new to Python I somehow cannot figure out an elegant solution. The problem reduces to the following question: How to pickle a...
0
by: Ben Finney | last post by:
Armin Ronacher <armin.ronacher@active-4.comwrites: A welcome addition. Since we're not proposing a built-in type, could we choose a name that is more explicit, and consistent with the types...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.