[Python-ideas] Make obj[] valid syntax?

Thomas Heller theller at ctypes.org
Wed Nov 14 19:37:48 CET 2007

Guido van Rossum schrieb:
> Why can't you use call syntax, i.e. obj.prop(1, 2, 3)?

Because I cannot set the property in this way:

obj.prop(1, 2, 3) = "foo"

Of course I know that obj.set_prop(1, 2, 3, "foo") would work.

More information about the Python-ideas mailing list