New statement proposal for Python

Emile van Sebille emile at fenx.com
Fri Jun 15 09:16:44 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:9gceld02n4c at enews1.newsguy.com...

<snip>

> value to that same named attribute (since it's EXACTLY the
> same operation...); by your logic, "it should therefore use
> the same syntax".  So how comes:
>     fee.fie = foo.fum
> and
>     setattr(fee, 'fie', foo.fum)
> and
>     fee.fie = getattr(foo, 'fum')
> and
>     setattr(fee, 'fie', getattr(foo, 'fum'))
> use four widely divergent syntax forms for the same op?-)

Well, really eight if you note that fum requires arguments:  ;-)
fee.fie = foo.fum(eggs.spam)

But could you explain why I see this as two forms but you see it as four?
Is it a left/right thing?

--

Emile van Sebille
emile at fenx.com

---------






More information about the Python-list mailing list