[Python-ideas] Object grabbing (was: Re: Python-ideas Digest, Vol 114, Issue 5)

Nathaniel Smith njs at pobox.com
Mon May 2 14:51:46 EDT 2016


On May 2, 2016 11:46 AM, "Barry Warsaw" <barry at python.org> wrote:
>
> On May 02, 2016, at 04:25 PM, Robert van Geel wrote:
>
> >Django would break when the 'using' keyword would be used for that
>
> Not that it's super popular, but I'd hate to lose 'using' to a keyword
too.
>
> http://flufli18n.readthedocs.io/en/latest/docs/using.html

I guess the obvious alternative would be

in namespace:
    ...

The pandas folks would love to have something like this actually, if it let
you write

in some_table:
    total_height = height_feet * 12 + height_inches

instead of the current

some_table["total_height"] = some_table["height_feet"] * 12 +
some_table["height_inches"]

Of course this requires that the namespace be accessed via some kind of
hookable interface, not just a built in object or dict.

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160502/07e34237/attachment.html>


More information about the Python-ideas mailing list