Why I love python.
Jack Diederich
jack at performancedrivers.com
Thu Aug 12 21:59:45 EDT 2004
On Thu, Aug 12, 2004 at 08:22:01PM -0400, Mark Bottjer wrote:
> Michael Scarlett wrote:
> >I don't know about the rest of you, but I learned python and fell in
> >love with its syntax and simplicity.
>
> That's the funny thing about Python. It really isn't simple, but it sure
> seems like it is. There's tons of little niggling rules about scoping,
> inheritance, and what have you--but you can be blissfully ignorant of
> most of them and still get work done. That's pretty unique.
>
> I think that's why people are so concerned about @pie: it has the
> *potential* to be an obstacle early in the learning process, instead of
> after someone is already hooked.
>
Agreed, python isn't simple and those hidden things are actually useful for
getting real work done. I've been using python industrially for three years
and I'm a big fan of decorators; decorators would help me get things done.
I liked the look of [decorators] before colon option more, but the current
situation of
def foo(a,b,c):
#
# 60 lines of code here
#
foo = mutate(foo) # oh, and by the way the 'def foo'
# signature might be misleading
'foo = mutate(foo)' It is boilerplate, python is nice because it eschews
boilerplate.
While the decorator syntax might not be obvious to newbies they won't see
it in simple code. When then do see it having @mutate right next to the
func def has to be more of a clue than 'foo=mutate(foo)' lines or screens away.
-Jack
More information about the Python-list
mailing list