Re: [Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
Thanks. I think this is understood better now. Thanks to everyone for their help. I was running low on ways to express this for clearer understanding. Awesomeness once again from [EMAIL PROTECTED] - John On Jan 21, 2008 10:18 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > John Mor

Re: [Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
Sort of. I see some light beginning to dawn ;). On Jan 21, 2008 9:16 PM, John Morris <[EMAIL PROTECTED]> wrote: > class Foo: > '''Represents a foo''' > def __init__(self, name): > '''Initializes the person's data''

Re: [Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
2/01/2008, John Morris <[EMAIL PROTECTED]> wrote: > > I thought each class got it's own namespace and this sharing of mutable > > objects is confusing me. > > Each class gets its own namespace, but names are different from > objects. For example: > > >>

Re: [Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
Thanks, so I could/should do self.ot = Bar(self.name.copy()) instead On Jan 21, 2008 9:25 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > John Morris wrote: > > > Why does the pop in the Bar class nuke the srv k & v from Foo.name > > <http://Foo.name> as wel

Re: [Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
On Jan 21, 2008 9:16 PM, John Morris <[EMAIL PROTECTED]> wrote: > class Foo: > '''Represents a foo''' > def __init__(self, name): > '''Initializes the person's data''' > self.name = name >

[Tutor] dictionaries, objects and scoping...

2008-01-21 Thread John Morris
class Foo: '''Represents a foo''' def __init__(self, name): '''Initializes the person's data''' self.name = name print '(Initializing %s)' % self.name self.ot = Bar(self.name) print '(After Other - %s)' % self.name class Bar: def __init__(self, name): self.name

Re: [Tutor] Question regarding syntax

2007-07-12 Thread John Morris
On 7/11/07, Andre Roberge <[EMAIL PROTECTED]> wrote: It is a standard convention. Lots of tools are built on the assumption that translatable strings are going to be enclosed in _(...) These tools extract the strings from programs, and put them in files (.po) that are easily editable by human

Re: [Tutor] Question regarding syntax

2007-07-11 Thread John Morris
On 7/11/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > I'm editing some code from Mailman and seeing: > > legend = _("%(hostname)s Mailing Lists") > The outer parentheses are a function call. Th

[Tutor] Question regarding syntax

2007-07-11 Thread John Morris
I'm editing some code from Mailman and seeing: legend = _("%(hostname)s Mailing Lists") Can anyone tell me what the _( means in that context? Thanks, John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] executionable file

2007-06-22 Thread John Morris
On 6/22/07, Lucio Arteaga <[EMAIL PROTECTED]> wrote: Can any body tell me how I can make an executive file from a file.py? My knowledge of binaries is minimum. So please if you are sending me some method please do not be too sophisticated. Lucio Arteaga On Windows: http://www.py2exe.org/ I