STINNER Victor <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue11071>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com