Python language suggestion
Martijn Faassen
m.faassen at vet.uu.nl
Sat Jan 13 11:02:57 EST 2001
Moshe Zadka <moshez at zadka.site.co.il> wrote:
> On Thu, 11 Jan 2001 20:27:39 GMT, Chris Ryland <cpr at emsoftware.com> wrote:
>> This migh sound radical, but has anyone ever entertained the idea that
>> foo.'bar bletch' might be a useful and logical extension of Python's
>> current attribute selection machinery?
>>
>> I realize that foo['bar bletch'] is just as good for dictionary-like
>> objects, but foo.'bar bletch'
> getattr(foo, 'bar bletch') works in Python.
Sure, but this could be syntactic sugar. Along the lines Python 2.0 now
has apply() but also the foo(a, *bar, **baz) invocation syntax.
Not that I'm actually advocating this. I'm just toying with the idea.
Regards,
Martijn
--
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?
More information about the Python-list
mailing list