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 rndblnch
Recipients rndblnch
Date 2014-01-21.21:45:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390340737.95.0.677221459573.issue20335@psf.upfronthosting.co.za>
In-reply-to
Content
% python3
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help(bytes)
bytes constructor accepts more than one argument even of the first one is not a string (and then the other arguments are checked to be strings):

    >>> bytes(2, "foo", "bar")
    b'\x00\x00'
    >>> bytes(2, "foo")
    b'\x00\x00'

but:

    >>> bytes(2, 1)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: bytes() argument 2 must be str, not int
History
Date User Action Args
2014-01-21 21:45:38rndblnchsetrecipients: + rndblnch
2014-01-21 21:45:37rndblnchsetmessageid: <1390340737.95.0.677221459573.issue20335@psf.upfronthosting.co.za>
2014-01-21 21:45:37rndblnchlinkissue20335 messages
2014-01-21 21:45:37rndblnchcreate