using super

iu2 israelu at elbit.co.il
Wed Jan 2 05:52:59 EST 2008


On Jan 1, 8:12 pm, Scott David Daniels <Scott.Dani... at Acm.Org> wrote:

> We accept this seems natural to you.  You don't seem to understand why
> others might not think so.  I fear this is the kind of thing that
> separates programmers into two classes: the smart ones that can set up
> the chains, and the others to whom you say "don't worry your pretty
> little head about it; it all happens auto-magically."

Well, that was exactly my original post, see above. I didn't know
about new style classes.
People here responded with helpful information. Since I can program
the feature I want, I've got no complaints.
(I realize that popping PEPs pop the nerves, so, forget about my
suggestion... :)

> little head about it; it all happens auto-magically."  Python is
> remarkably free of such things, and I am loathe to give that up.

isn't
@deco_somthing
def my_func():
  code..

a magic?

isn't

with file('file.txt') as f:
  code..

a magic?


And what about an 'yield' in a middle of a loop? Or dynamic types (to
someont coming from C for example)...

I think Python is full of magics (and I like it very much).

Once you get used to a magic, it ceases being a magic. It becomes
automation. It does thing for you (with your control over it) instead
of you doing these things. Well, I don't even need to say this,
because that's what Python is all about right? Otherwise I would use C+
+..

I don't at all think chaining (or whatever this is actually called) is
magic. But I agree that it is not possible to integrate everything
every one wants into the language.


> The value reduced auto-magic is that the users of the language
> can learn smoothly, rather than climbing steep mountains of
> understanding.  Since you are relatively new to the language (I
> presume so, since you left self out of several method definitions),
> see how the language works on its terms first, before suggesting
> how to make it more like some other language you like.
>

I wrote the examples quickly to show what I mean, did'nt check them,
sorry.
I must say this:
I actually use Python for 5 years, I've written many many small helper
scripts and several not-too-big applications with it and I was very
pleased. I think it's a great language.
I also wrote in tcl (quite a bit), perl, and Lisp (less) but Python is
the one that I enjoy the most. That's why I feel free to say what I
think is missing (and if you don't like it, I'll try not to do it, I
think Python's developers are doing a great work).

I missed new style classes though... Now I know how to use them (not
fully), but I must say it has been difficult. I'll appreciate some
good documentation about them.

Thanks
iu2



More information about the Python-list mailing list