Re: Project organization and import

2007-03-04 Thread Nicholas Parsons
1a) Module/class collision. I like to use the primary class in a file as the name of the file. However this can lead to namespace collisions between the module name and the class name. Also it means that I'm going to be stuck with the odious and wasteful syntax foo.foo everywhere, or forced to

Re: pop method question

2007-03-04 Thread Nicholas Parsons
On Mar 4, 2007, at 4:38 AM, Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Nicholas > Parsons wrote: > >> Just from my computer science background when I see pop(), I think >> of a >> stack data structure. > > Then question your p

Re: pop method question

2007-03-04 Thread Nicholas Parsons
Hi Jordan, That is true what you say about pop() behavior with stack-like objects. But the definition of pop() for a stack-like structure is stronger than that. A stack is a LIFO data structure. Therefore the pop() operation is defined to not only mutate the receiver and return the item

Re: pop method question

2007-03-03 Thread Nicholas Parsons
some ambiguity with the dangling if statement. So I guess you can't win for trying :). Just call me a purist and think of me as someone who likes consistency. Python is here to stay and no language is perfect... --Nick On Mar 3, 2007, at 7:32 PM, Raymond Hettinger wrote: > [Nichola

Re: pop method question

2007-03-03 Thread Nicholas Parsons
On Mar 3, 2007, at 3:49 PM, Paul Rubin wrote: > Nicholas Parsons <[EMAIL PROTECTED]> writes: >> I was just playing around in IDLE at the interactive prompt and typed >> in dir({}) for the fun of it. I was quite surprised to see a pop >> method defined there. I mean

pop method question

2007-03-03 Thread Nicholas Parsons
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data s

Newbie Test

2007-03-02 Thread Nicholas Parsons
Greetings, This is just a test to see if I can post to this mailing list. Can someone from the list please respond to this email so I know it worked? Thanks in advance! --Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: classes and functions

2007-03-02 Thread Nicholas Parsons
Hi Claire, That is the beauty of using Python. You have a choice of using classes and traditional OOP techniques or sticking to top level functions. For short, small scripts it would probably be overkill to use classes. Yet the programmer still has classes in his tool chest if he/she is