[issue11071] What's New review comments
STINNER Victor
report at bugs.python.org
Mon Jan 31 14:48:06 CET 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
ABCMeta should be replaced by abc.ABCMeta, or other "abc." prefixes should be removed.
class Temperature(metaclass=ABCMeta):
@abc.abstractclassmethod
def from_fahrenheit(self, t):
...
@abc.abstractclassmethod
def from_celsius(self, t):
...
I don't know/understand the "->" syntax:
>>> print(byte_stream.getvalue())
b'G3805 showroom Main chassis ' ->
b'X7899 warehouse Reserve cog ' ->
b'L6988 receiving Primary sprocket'
If you would like to split record by record, use something like:
>>> x=byte_stream.getvalue()
>>> [x[index:index+REC_LEN] for index in range(0,len(x),REC_LEN)]
[b'G3805 showroom Main chassis ', b'X7899 warehouse Reserve cog ', b'L6988 receiving Primary sprocket']
--
$ ./python
Python 3.2rc2+ (py3k:88277, Jan 31 2011, 14:24:09)
>>> from ast import literalrequest
ImportError: cannot import name literalrequest
--
>>> import shutil, pprint
...
>>> f = make_archive(...)
It's shutil.make_archive(), not make_archive() here.
>>> shutil.register_archive_format( # register a new archive format
name = 'xz',
function = 'xz.compress',
extra_args = [('level', 8)],
description = 'xz compression'
)
The function have to be callable: a str is not callable.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11071>
_______________________________________
More information about the Python-bugs-list
mailing list