Re: Very, Very Green Python User



hanumizzle@xxxxxxxxx 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
mean.

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@xxxxxxx
.



Relevant Pages

  • Re: Free seminar on domain-specific modeling
    ... Distill patterns into abstract ... Virtually no programming language is well tailored to it. ... We could have static slots (Smalltalk instance variables), ...
    (comp.lang.smalltalk)
  • Explicit or implicit declaration and inference
    ... The general architecture of this interpreted language is similar to ... and Instance variables begin with a single @ ... This model seems to work because the compiler is able ... The declaration of a variable would not specify the ...
    (comp.lang.misc)
  • Explicit or implicit declaration and inference
    ... The general architecture of this interpreted language is similar to ... and Instance variables begin with a single @ ... This model seems to work because the compiler is able ... The declaration of a variable would not specify the ...
    (comp.compilers)
  • Re: CMUCL for Windows - how much $$$ ?
    ... and Linux -- let me just disagree strongly with this view of the VC++ IDE. ... It has a debugger that doesn't crash several times a day. ... Finally, yes the VB language sucks, in many and varied ways. ... never heard the development environment described as one of them. ...
    (comp.lang.lisp)
  • Re: how to modify code while debugging it without having to stop and then restart debugger
    ... as i mentioned even micro$soft can do this using statically type languages like visual basic and csharp. ... if i am inside a function and there is some an error on a line and that is where the debugger is currently pointing at, ... > i have been a dos/windows user using some form of the basic language for 30 years now. ... > so how can i use python to debug code and change that code without having to restart the code. ...
    (comp.lang.python)