[Python-3000] Python 3.0 - what's new
Guido van Rossum
guido at python.org
Fri Dec 5 19:15:46 CET 2008
Ah, I didn't know about :samp: and the {...} notation. Feel free to
convert all my examples that way.
On Thu, Dec 4, 2008 at 11:26 PM, Georg Brandl <g.brandl at gmx.net> wrote:
> Guido van Rossum schrieb:
>> Good catches.
>>
>> On Thu, Dec 4, 2008 at 3:29 AM, Oleg Broytmann <phd at phd.pp.ru> wrote:
>>> http://docs.python.org/dev/3.0/whatsnew/3.0.html
>>>
>>>> os.getcwdu() returns the current working directory as a bytes instance
>>>
>>> getcwdb(), I suppose?
>>>
>>>> New binary literals, e.g. 0b1010 (already in 2.6).
>>>> Bytes literals are introduced with a leading b or B, and there is a new
>>>> corresponding builtin function, bin().
>>>
>>> I think, the last sentence should say "builtin function, bytes()", and
>>> bin() should be mentioned in the previous entry about binary literals.
>>>
>>> It seems there are a few conversion errors like this:
>>>> The only acceptable syntax for relative imports is from .``[*module*] :keyword:`import` *name*; :keyword:`import`
>>> Seems like bacticks are not handled properly.
>>
>> Odd. I guess ``.`` is only recognized when surrounded by whitespace.
>> Seems like Andrew fixed this by writing the two forms separately, but
>> now 'module' is not italicized. I'd rather have a space between ``.``
>> and [*module*]. I'll fix this in the py3k branch.
>
> reST is a bit awkward here; markup is not recognized when not surrounded
> by "nonword characters", and it seems to count the dot as a word character.
> You can always fix this by inserting an "escaped space" which vanishes in
> the parsed document, e.g. from ``.``\ [*module*] import ...
>
> I'd suggest leaving out the keyword markup here; then you need only a single
> literal span. You can use :samp:`from .{module} import {name}` to italicize
> names in it.
>
> Georg
>
> --
> Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
> Four shall be the number of spaces thou shalt indent, and the number of thy
> indenting shall be four. Eight shalt thou not indent, nor either indent thou
> two, excepting that thou then proceed to four. Tabs are right out.
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list