J2 0-2-6 is available
Doug Holton
insert at spam.here
Tue Aug 24 21:35:20 EDT 2004
Neil Hodgson wrote:
> I'd like to dissent on "using". To me, this code does not read well.
>
> using:
> classmethod
> def foo(cls):
> pass
>
> foo *is* a class method, it is not *using* a class method. In C#, "using"
> has too meanings: the first is to import a library and the second is to
> acquire a resource which will be automatically released. Both of these are
> seem reasonable as some thing (the object of the using clause) is being
> used.
It also will confuse people when we ever hit python 3 (see
http://www.python.org/cgi-bin/moinmoin/Python3_2e0).
We'll have a "with" (or similar keyword) that will work like this:
with self:
.property1 = True
.init()
"with" and "using" are way too similar, although they would be doing
*completely* different things. This would also rule out other proposed
generic keywords like: by, having, per, via, extend (extend means
subclassing in most other languages)...
but would leave as still suitable keywords like: meta, decorate, or
predef (although predef is as meaningless to a python beginner as "def" is).
More information about the Python-list
mailing list