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 larry
Recipients larry, serhiy.storchaka, zach.ware
Date 2015-04-19.01:06:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429405577.22.0.134829799978.issue24001@psf.upfronthosting.co.za>
In-reply-to
Content
New proposed semantics for the types= parameter to converters: where possible, pass in actual types.  The resulting syntax:

  c: int(types={str}) # maps to 'U'
  s: str(types={str, robuffer}, length=True, zeroes=True) # maps to 's#'

Since "buffer", "robuffer", and "rwbuffer" are fake pseudotypes, I created empty classes with those names.

Serhiy: with this change in place, the types= parameter uses almost the same number of characters as it used to when it was a string.  (The new syntax requires commas between elements, so for two or more types it's slightly longer.)  Yet this makes the types= parameter far more accurate in illustrating what it's supposed to represent.

Does this make you happy? :)
History
Date User Action Args
2015-04-19 01:06:17larrysetrecipients: + larry, zach.ware, serhiy.storchaka
2015-04-19 01:06:17larrysetmessageid: <1429405577.22.0.134829799978.issue24001@psf.upfronthosting.co.za>
2015-04-19 01:06:17larrylinkissue24001 messages
2015-04-19 01:06:16larrycreate