[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean
New submission from Pavel Strashkin <[EMAIL PROTECTED]>: Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.ElementTree import Element >>> e = Element('Test', {'attr' : 'value'}) >>> b = not e >>> print b True Why i'm getting True here instead of False? Because of this i can not do: if not e: # here some logic pass -- components: XML messages: 68720 nosy: xaka severity: normal status: open title: invalid conversion xml.etree.ElementTree.Element object to boolean versions: Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3195> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3442] wsgiref.validate.InputWrapper.readline does not accept optional "length" argument
New submission from Pavel Strashkin <[EMAIL PROTECTED]>: All file/stream-like objects in Python have "readline" method with optional "length" argument, but wsgiref.validate.InputWrapper doest not have. Some 3rd party modules/packages use this argument. As result there is exception: : readline() takes exactly 1 argument (2 given) I think wsgiref.validate.InputWrapper.readline must be implemented same to wsgiref.validate.InputWrapper.read: def readline(self, *args, **kwargs): v = self.input.readline(*args, **kwargs) assert_(type(v) is type("")) return v -- components: Library (Lib) messages: 70248 nosy: xaka severity: normal status: open title: wsgiref.validate.InputWrapper.readline does not accept optional "length" argument versions: Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3442> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23766] json.dumps: solidus ("/") should be escaped
New submission from Pavel Strashkin: According to http://www.json.org/ and https://tools.ietf.org/html/rfc7159#section-7, the solidus ("/") should be escaped ("\/") and currently it's not. -- messages: 239170 nosy: xaka priority: normal severity: normal status: open title: json.dumps: solidus ("/") should be escaped type: behavior ___ Python tracker <http://bugs.python.org/issue23766> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com