New submission from Larry Hastings: 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? :) ---------- assignee: larry components: Argument Clinic files: larry.clinic.use.raw.types.1.txt messages: 241469 nosy: larry, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Clinic: use raw types in types= set type: enhancement Added file: http://bugs.python.org/file39114/larry.clinic.use.raw.types.1.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24001> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com