473,761 Members | 10,276 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 1544
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
2064
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 in all the different collections but there surely must be a better way. Thanks! NJ
0
1362
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 database every time the page loads. Administrators of the system can change users settings while...
1
5126
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
2682
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
1337
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 the database when a user clicks on the message header and cache it locally until the form is...
4
3994
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
16165
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
6101
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 = collections.defaultdict(lambda: 1) >>> f = file("temp","w")
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
9531
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9957
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3881
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

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.