[Python-checkins] r82848 - python/branches/py3k/Doc/library/ast.rst
Georg Brandl
g.brandl at gmx.net
Wed Jul 14 10:46:40 CEST 2010
Am 13.07.2010 23:52, schrieb Benjamin Peterson:
> 2010/7/13 Georg Brandl <g.brandl at gmx.net>:
>> Am 13.07.2010 19:17, schrieb Ezio Melotti:
>>> On 13/07/2010 9.38, georg.brandl wrote:
>>>> Author: georg.brandl
>>>> Date: Tue Jul 13 08:38:10 2010
>>>> New Revision: 82848
>>>>
>>>> Log:
>>>> Add bytes in literal_eval doc.
>>>>
>>>> Modified:
>>>> python/branches/py3k/Doc/library/ast.rst
>>>>
>>>> Modified: python/branches/py3k/Doc/library/ast.rst
>>>> ==============================================================================
>>>> --- python/branches/py3k/Doc/library/ast.rst (original)
>>>> +++ python/branches/py3k/Doc/library/ast.rst Tue Jul 13 08:38:10 2010
>>>> @@ -119,14 +119,14 @@
>>>>
>>>> Safely evaluate an expression node or a string containing a Python
>>>> expression. The string or node provided may only consist of the following
>>>> - Python literal structures: strings, numbers, tuples, lists, dicts, sets,
>>>> - booleans, and ``None``.
>>>> + Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
>>>> + sets, booleans, and ``None``.
>>>>
>>>> This can be used for safely evaluating strings containing Python expressions
>>>> from untrusted sources without the need to parse the values oneself.
>>>>
>>>> .. versionchanged:: 3.2
>>>> - Now allows set literals.
>>>> + Now allows bytes and set literals.
>>>>
>>>>
>>>> .. function:: get_docstring(node, clean=True)
>>>> _______________________________________________
>>>> Python-checkins mailing list
>>>> Python-checkins at python.org
>>>> http://mail.python.org/mailman/listinfo/python-checkins
>>>>
>>> This has been fixed in 3.1 too in r82829. As I said on IRC I consider
>>> this (and the missing set literals on 2.7/3.1) as a bug, so I would:
>>> 1) remove the versionchanged from 3.2;
>>> 2) add bytes literal in the doc for 3.1 (the fix has been backported
>>> already);
>>> 3) backport and document set literals to 3.1 and 2.7 too;
>>> 4) possibly update the doc for byte literals in 2.7 too (it just says
>>> 'strings' but it supports u"" and b"" too).
>>>
>>> (and if it can't be consider as a bug, the fix should probably be
>>> reverted from 3.1)
>>
>> And as I said on IRC :), I don't consider this a bug fix, so I won't do anything
>> about backporting or reverting in 3.1 or 2.7 -- this is up to Benjamin.
>
> And I'm with Georg on this.
Will you revert the bytes change in 3.1 then?
Georg
More information about the Python-checkins
mailing list