Very, Very Green Python User

Scott David Daniels scott.daniels at
Mon Mar 13 17:46:13 CET 2006

hanumizzle at wrote:
> ... Is the Python debugger fairly stable?
Yes, but it is not massively featured.  The "Pythonic" way is to
rarely use a debugger (test first and straightforward code should
lead to "shallow" bugs).  Often for most of us judiciously placed
print statements suffice.

 > The one you get with Perl stinks on ice. More than
> anything else, I would like to have a powerful OO environment where I
> do not have to worry about the debugger sucking ....
Do watch your language on this newsgroup.  Lots of people read this
group and there is no good reason to offend them.  In turn, you will be
cut some slack.

> A couple blemishes I'm concerned about, though:
> Python closures are apparently very poor, but from what I can surmise
> of the PyGTK2 page, instances of objects are dynamic enough to add new
> methods, so you get your callbacks, at least.

What do you mean by "very poor"?  Python prefers you to use functions
defined with a suitable name in places other languages provide stronger
lambda expressions, if that's what you mean.  Also, there is no easy way
to affect the variables of an encasing function, if that is what you

> Double-underscore methods are rewritten with the class name? That's an
> ugly hack, but remember I'm coming from Perl. If the language doesn't
> pull many other hijinks, that's OK.

Double-underscore is a strong language convention and warning.  Names
both beginning and ending with double-underscore may be "magic" in
that interacting with them affects more behavior than the same code
using a different name.  Instance variables with double-underscore as
a leading convention get "mangled" just so that when you are designing
"mixin" classes you can easily choose names that should not collide
with the instance variable names of classes using your "mixin" classes.

> I have plenty of docs and stuff, now I'm just looking for wisdom. As a
> seasoned Python user, what do you have to impart?

I think if you spend the effort to learn to use Python you'll have a
wonderful experience.  Welcome to the newsgroup.

--Scott David Daniels
scott.daniels at

More information about the Python-list mailing list