This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eli.bendersky, georg.brandl, ncoghlan, rhettinger, vinay.sajip, vstinner
Date 2011-01-31.13:48:05
SpamBayes Score 9.972721e-07
Marked as misclassified No
Message-id <1296481686.44.0.678773362705.issue11071@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-31 13:48:06vstinnersetrecipients: + vstinner, georg.brandl, rhettinger, vinay.sajip, ncoghlan, eli.bendersky
2011-01-31 13:48:06vstinnersetmessageid: <1296481686.44.0.678773362705.issue11071@psf.upfronthosting.co.za>
2011-01-31 13:48:05vstinnerlinkissue11071 messages
2011-01-31 13:48:05vstinnercreate