[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Ori Avtalion
Ori Avtalion added the comment: My use-case is modifying existing code that supports bytes to also support bytearray. https://github.com/mongodb/mongo-python-driver/blob/9902d239b4e557c2a657e8c8110f7751864cec95/bson/_cbsonmodule.c#L1112 The buffer protocol, which I didn't know of,

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Ori Avtalion
New submission from Ori Avtalion : It would be useful to have a shared API for consuming bytes and bytearrays. At present, I need to write very similar code twice. Some existing codebases only support bytes (perhaps forgetting bytearrays exist). Adding support for bytearray would be trivial

[issue35827] C API dictionary views type checkers are not documented

2019-01-25 Thread Ori Avtalion
New submission from Ori Avtalion : dictobject.h defines several helpers to ease checking of dictionary view types. If they are meant to be part of the API, they should be documented. PyDictKeys_Check PyDictItems_Check PyDictValues_Check PyDictViewSet_Check Should they be added to dict.rst

[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread Ori Avtalion
Ori Avtalion added the comment: Sorry, I was confused by how Python 3 prints the traceback of ignored exceptions, and Python 2 does not. (This happens on on any exception and not just OSError) -- resolution: -> not a bug stage: -> resolved status: open -&g

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2019-01-15 Thread Ori Avtalion
Ori Avtalion added the comment: I encountered a similar bug and reported it as issue 35743. -- nosy: +salty-horse ___ Python tracker <https://bugs.python.org/issue22

[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread Ori Avtalion
New submission from Ori Avtalion : When an OSError exception is raised in __del__, both Python 2 and 3 print the "Exception ignored" message, but Python 3 also prints a traceback. This is similar to issue 22836, with dealt with errors in __repr__ while inside __del__. Test scrip

[issue32496] lib2to3 fails to parse a ** of a conditional expression

2019-01-14 Thread Ori Avtalion
Ori Avtalion added the comment: This can be circumvented by adding parenthesis: dummy(**(kwargs if kwargs else dict())) -- nosy: +salty-horse ___ Python tracker <https://bugs.python.org/issue32

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2018-04-26 Thread Ori Avtalion
Ori Avtalion added the comment: If sets are to be supported, then so should dictionary views. Please also consider the range type. -- nosy: +salty-horse ___ Python tracker <https://bugs.python.org/issue31

[issue20169] random module doc page has broken links

2016-02-15 Thread Ori Avtalion
Changes by Ori Avtalion : -- nosy: +salty-horse ___ Python tracker <http://bugs.python.org/issue20169> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Ori Avtalion
New submission from Ori Avtalion : Using trunk r87157 The Grammar/Grammar file defines a "dictmaker" symbol that is no longer referenced in any other symbol. It should be removed. -- components: Interpreter Core messages: 123738 nosy: salty-horse priority: normal severi

[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error

2010-02-20 Thread Ori Avtalion
Ori Avtalion added the comment: > In which specific case did you find the problem you mentioned ? I didn't. I only pointed out the inconsistency. I'm happy with rejecting this bug, if it's not seen as a problem. -- ___ Pyt

[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error

2010-02-18 Thread Ori Avtalion
Ori Avtalion added the comment: Ignoring the custom utf-8/latin-8 conversion functions, the actual checking if a codec exists is done in Python/codecs.c's PyCodec_Decode. Is that where I should move the aforementioned optimization to? Is it safe to assume that the decoded object is alw

[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error

2010-02-18 Thread Ori Avtalion
Ori Avtalion added the comment: OK. The attached patch removes the empty string check before decoding. I'm not sure where tests should go, since I can only find them in Lib/test/ and this is not a library change. -- keywords: +patch Added file: http://bugs.python.org/file

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2009-07-26 Thread Ori Avtalion
Ori Avtalion added the comment: For those who missed it, the patch that was committed in r59967 was quickly reverted in r59970 with the comment: "Temporarily revert 59967 until GC can be added." Raymond, can you please explain what was missing from

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2009-07-26 Thread Ori Avtalion
Changes by Ori Avtalion : -- nosy: +salty-horse ___ Python tracker <http://bugs.python.org/issue1820> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4563] Wrong formatting of contributor list in About page

2008-12-06 Thread Ori Avtalion
New submission from Ori Avtalion <[EMAIL PROTECTED]>: The bulleted list of credits in the about page is turning people's initials into numbering. For example: * A. Amoroso * L. Peter Deutsch appear as * 1. Amoroso * 12. Peter Deutsch <http://docs.python.

[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

2008-06-25 Thread Ori Avtalion
Ori Avtalion <[EMAIL PROTECTED]> added the comment: I think there's been a little misinterpretation of the standard in the comments above. It's important to note that RFC 2822 basically defines folding as "adding a CRLF before an existing whitespace in the original

[issue2120] broken links in advocacy HOWTO

2008-02-15 Thread Ori Avtalion
Ori Avtalion added the comment: Removing the spaces is wrong. They should be replaced with '~'. I also found two other punctuation problems: * A period that should be a colon. * A comma that should be a dash/semicolon/something else. I'm not really sure what's the best r

[issue2120] broken links in advocacy HOWTO

2008-02-14 Thread Ori Avtalion
New submission from Ori Avtalion: The file python/trunk/Doc/howto/advocacy.rst has two broken links: "http://www.catb.org/ esr/jargon/html/C/compact.html" should be "http://www.catb.org/~esr/jargon/html/C/compact.html"; "http://homepages.cwi.nl/ steven/abc/" (line

[issue1712] Small errors in new-style classes doc

2007-12-30 Thread Ori Avtalion
New submission from Ori Avtalion: These refer to the "New-style and classic classes" section in Doc/reference/datamodel.rst. 1) The URL should be <http://www.python.org/doc/newstyle/> instead of <http://www.python.org/doc/newstyle.html>. 2) The last line: "new-styl

[issue1571] Better description of 'L' repr removal in "What's New"

2007-12-08 Thread Ori Avtalion
New submission from Ori Avtalion: The "common stumbling blocks" section reads: * Code that unconditionally strips the trailing ``L`` from the ``repr()`` of a long integer will chop off the last digit instead. This explains a problem and a fix without any reason (one has to gue