Brecht Machiels added the comment:
In order to adapt code to this change, can we assume that a NEWLINE token with
an empty string only occurs right before the ENDMARKER?
--
nosy: +brechtm
___
Python tracker
<https://bugs.python.org/issue33
Changes by Brecht Machiels <bre...@mos6581.org>:
Added file: http://bugs.python.org/file46800/make_gcc.txt
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Brecht Machiels <bre...@mos6581.org>:
Added file: http://bugs.python.org/file46799/make.txt
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Brecht Machiels:
The python.exe produced during the build process is somehow broken:
$ ./python.exe -S
Killed: 9
Strangely, it works when run from gdb:
$ gdb -args ./python.exe -S
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc
Brecht Machiels added the comment:
I see. In that case I think pip should be able to handle the case when
site.USER_SITE is None. I have created a ticket here:
https://github.com/pypa/pip/issues/4437.
I am using the embeddable Python what's it intended for, to make a
self-contained
New submission from Brecht Machiels:
Previous versions of the embeddable Python:
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" f
New submission from Brecht Machiels:
These both raise an exception:
class Null(type(None)): pass
class Null(object, type(None)): pass
The following does not:
class Object(object): pass
class Null(Object, type(None)): pass
This should also raise a TypeError.
Also, the result
Brecht Machiels added the comment:
Ok. I was afraid a fix for this might affect class Integer(Object, int). Good
to hear it shouldn't.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24806
Brecht Machiels added the comment:
Similar inconsistent behavior for:
class Object(object): pass
class Integer(Object, int): pass
versus
class Integer(object, int): pass
However, I'm successfully using the first version, which saves some boilerplate
code for emulating ints
Brecht Machiels added the comment:
This is a real-world example where this type of inheritance is used:
https://github.com/brechtm/rinohtype/blob/8bd961243c1059aa7cb738493e4687f7a5930d5b/rinoh/backend/pdf/cos.py#L121
I don't think there is any inherent reason not to subclass from (indirectly
New submission from Brecht Machiels:
set's add() method would be a little bit more useful if it would return True if
the added value was already present in the set, and False if it wasn't (or the
other way around). Similarly, discard() could report whether the discarded
value was present
Brecht Machiels added the comment:
What's the status of this patch? What still needs to be done for it to be
accepted?
--
nosy: +brechtm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
New submission from Brecht Machiels:
With Python 3.2, I subclassed ElementTree.XMLParser to set
ExternalEntityRefHandler on the XMLParser's (expat) 'parser' member. I
understand the 'parser' member is not part of the public API, but this was the
only way to customize the parser without having
Brecht Machiels added the comment:
You can import the pure python version in cPython by blocking the import of
the C accelerator:
import sys
sys.modules['_elementtree'] = None
import xml.etree.ElementTree
This will not work if xml.etree.ElementTree was already imported by another
New submission from Brecht Machiels bre...@mos6581.org:
I have subclassed int to add an extra attribute:
class Integer(int):
def __new__(cls, value, base=10, indirect=False):
try:
obj = int.__new__(cls, value, base)
except TypeError:
obj = int.__new__
15 matches
Mail list logo