473,544 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1533
Look in Modules/_collectionsmod ule.c

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

On 7/22/07, Gordon Airporte <JH*****@fbi.go vwrote:
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/collectionsmodu le.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.go vwrote:
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
2038
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 at the module level for the entire project to access as well as collections defined within different objects. Currently, I'm updating Object 1 manually...
0
1332
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 settings/permissions etc held in a collection which is in a module. This enables the user to access their settings from page to page without quering a...
1
5119
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 Where can I download the python collection module? I am no python programmer, but I can build/install python packages if I know where to get them.
2
2671
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 module. Does anyone have a method for doing this?
1
1323
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 you'd click on a message header and the message body appears in a read only text box. To reduce network traffic I plan to download the message body from...
4
3980
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 can raise an event and I need the managing class (Devices) to be able to catch these events. Public Class Device Public Event StatusChange()
3
16140
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; .... My compile fails using csc.exe:
3
6080
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 collections.defaultdict object that has set the default_factory property? For Example (from the IDLE console): >>> words =...
0
149
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 in 'collections' already. I'd prefer one of the following: collections.ordereddict
0
7429
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7368
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7777
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5301
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3420
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3414
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1844
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
990
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
671
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.