[Python-ideas] Proposal: Tuple of str with w'list of words'
Daniel Moisset
dmoisset at machinalis.com
Tue Nov 15 12:34:22 EST 2016
On 12 November 2016 at 17:01, Gary Godfrey <g.pythonideas at wamp.us> wrote:
> Hi,
>
> This is a little more readable, but still a bit ugly. What I'm proposing
> here is:
>
> mydf = df[ w'field1 field2 field3' ]
>
> This would be identical in all ways (compile-time) to:
>
> mydf = df[ ('field1', 'field2', 'field3') ]
>
If using a tuple as an index expression, wouldn't it be ok for you to use:
mydf = df['field1', 'field2', 'field3']
?
That should be equivalent to the second example, but without the doble
bracketing
Best,
D.
--
Daniel F. Moisset - UK Country Manager
www.machinalis.com
Skype: @dmoisset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161115/851ab615/attachment.html>
More information about the Python-ideas
mailing list