LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-07-2004, 05:51 PM   #1
Linh
Member
 
Registered: Apr 2003
Posts: 178

Rep: Reputation: 30
Is there a default size limit to a dictionary, list or array declaration ?


Is there a default size limit to a dictionary, list or array declaration ?

=====================

When I declared a dictionary and a list in Python, there is no where I could specified how big this dictionary or list can be such as declaring an array in C. ex: char array[1000] in C programming.

1) Is there a default size limit to a dictionary, or list declaration in Python (ex: 64 Kb or how many elements) ?

2) Is there a default size limit to an array declaration in Python (ex: 64 Kb or how many elements)?

=====================

dictionary = {'food':{'beef':1, 'egg':2},
'drink':{'apple juice':1, 'grape juice':2}}

list = ['123','456','789']
 
Old 06-07-2004, 07:14 PM   #2
kooch
Member
 
Registered: Mar 2004
Location: Upstate NY
Distribution: Slackware/YDL
Posts: 77

Rep: Reputation: 15
There is no limit theoretically. In reality it's limited by memory. I've seen multiple megabyte dictionaries in python.
I'm not sure how this effects access time or the point at which performance (if it does) deteriorates for dictionary access.
 
Old 06-08-2004, 11:35 AM   #3
Linh
Member
 
Registered: Apr 2003
Posts: 178

Original Poster
Rep: Reputation: 30
thank you kooch for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array declaration in class or main function??? redhatrosh Programming 4 03-15-2005 02:13 PM
c++: array size limit? bigfatdud Programming 14 01-27-2005 11:19 AM
Size of an array in C Hady Programming 6 04-06-2004 05:33 AM
PERL: Size of an array of an Array inspleak Programming 2 03-10-2004 02:24 PM
size of an array Longinus Programming 8 03-08-2004 01:48 PM


All times are GMT -5. The time now is 03:45 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration