[Python-3000] Python 3.0 - what's new

1 view
Skip to first unread message

Oleg Broytmann

unread,
Dec 4, 2008, 6:29:04 AM12/4/08
to Python 3000
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.

Can I also ask to move Table of Content to the beginning for text-mode
browsers (lynx/links/elinks)?

Oleg.
--
Oleg Broytmann http://phd.pp.ru/ p...@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-3000 mailing list
Pytho...@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: http://mail.python.org/mailman/options/python-3000/python-3000-garchive-63646%40googlegroups.com

Guido van Rossum

unread,
Dec 5, 2008, 12:47:45 AM12/5/08
to Oleg Broytmann, Python 3000, Andrew Kuchling
Good catches.

On Thu, Dec 4, 2008 at 3:29 AM, Oleg Broytmann <p...@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.

> Can I also ask to move Table of Content to the beginning for text-mode
> browsers (lynx/links/elinks)?
>
> Oleg.
> --
> Oleg Broytmann http://phd.pp.ru/ p...@phd.pp.ru
> Programmers don't die, they just GOSUB without RETURN.
> _______________________________________________
> Python-3000 mailing list
> Pytho...@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/)

Georg Brandl

unread,
Dec 5, 2008, 2:26:17 AM12/5/08
to pytho...@python.org
Guido van Rossum schrieb:

> Good catches.
>
> On Thu, Dec 4, 2008 at 3:29 AM, Oleg Broytmann <p...@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.

Guido van Rossum

unread,
Dec 5, 2008, 1:15:46 PM12/5/08
to Georg Brandl, pytho...@python.org
Ah, I didn't know about :samp: and the {...} notation. Feel free to
convert all my examples that way.

> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>

--
--Guido van Rossum (home page: http://www.python.org/~guido/)

Reply all
Reply to author
Forward
0 new messages