Python dot-equals (syntax proposal)
J. Cliff Dyer
jcd at sdf.lonestar.org
Fri Apr 30 12:20:19 EDT 2010
That's kind of a nifty idea. However, python is currently under a
syntax moratorium. No syntax changes will be accepted for at least 24
months starting from the release date of Python 3.1. See more details
here: http://www.python.org/dev/peps/pep-3003/
Cheers,
Cliff
On Fri, 2010-04-30 at 09:04 -0700, Jabapyth wrote:
> At least a few times a day I wish python had the following shortcut
> syntax:
>
> vbl.=func(args)
>
> this would be equivalent to
>
> vbl = vbl.func(args)
>
> example:
>
> foo = "Hello world"
> foo.=split(" ")
> print foo
> # ['Hello', 'world']
>
> and I guess you could generalize this to
>
> vbl.=[some text]
> #
> vbl = vbl.[some text]
>
> e.g.
>
> temp.=children[0]
> # temp = temp.children[0]
>
> thoughts?
More information about the Python-list
mailing list