Mitar added the comment:
I think the issue is that it is hard to subclass it. Ideally, call to open
would be made through a new _open method which would then call it, and one
could easily subclass that method if/when needed.
--
nosy: +mitar
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue22848>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Mitar added the comment:
Sure, but is old behavior useful in any use case? Every bugfix changes old
behavior in an irreversible way.
So in which use case you want the old behavior? Can you elaborate here?
--
___
Python tracker
<ht
New submission from Mitar :
Inside text elements both in HTML and SVG white-space is significant and
introduces differences in how things are rendered. By default in general all
white-space is collapsed into one space and then this is rendered, adding
additional text content.
I observed
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue17239>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Mitar added the comment:
FYI, this is exactly how ElementTree.tostring does it. So this would make
ElementTree.tostring behave the same as minidom.
@dhilst: I do not think a parameter is needed here. This is completely
compatible with HTML. It is just that currently an additional
Change by Mitar :
--
keywords: +patch
pull_requests: +14134
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14312
___
Python tracker
<https://bugs.python.org/issu
New submission from Mitar :
I am using Minidom to pretty-print XML. But currently if there is a quote
inside a text segment it escapes it to "
To my understanding this is unnecessary if all other symbols are escaped. This
escaping makes it really ugly and defeats the purpose of me
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue14465>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue5752>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Mitar added the comment:
That would be awesome!
BTW, just as an additional example, JavaScrpt's JSON.stringify encodes NaN and
Infinity to null. By having a custom function I could for example try to match
such implementation.
--
___
P
Mitar added the comment:
> So it's already possible to do what you describe, simply by doing:
I think there is an edge case here if a stdin/stdout is opened? It would get
closed at exist from the context, no?
So I suggest that a slight extension of what open otherwise returns is
New submission from Mitar :
Currently, there is only one argument which allows customization how float
numbers are encoded in JSON: allow_nan. But this does not allow one to hook
into the encoding of floating points really. The JSONEncoder is not called for
float numbers.
The motivation
Mitar added the comment:
Why not make FileType instance also a context manager, so you could do
something like:
with arguments.input as f:
assert arguments.input is f
For backwards compatibility, FileType would open eagerly as now, but it would
be closed at exit from context manager
Mitar added the comment:
I have a similar problem that text wrapper is closing the handle, and if I want
to make a workaround, it also fails:
buffer = io.Bytes()
with io.TextIOWrapper(buffer, encoding='utf8') as text_buffer:
write_content_to(text_buffer)
text_bu
Change by Mitar :
--
pull_requests: +4962
___
Python tracker
<https://bugs.python.org/issue15450>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue15450>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Mitar :
--
nosy: +mitar
___
Python tracker
<https://bugs.python.org/issue12932>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Mitar added the comment:
> That's the problem, right there. I don't think the ways of doing this are
> bulletproof and require too much cooperation between third-party libraries.
Which third-party libraries? The thing I am proposing works for that particular
file you call get
New submission from Mitar:
Currently, using non-legacy formatting in logging message is really cumbersome.
I think a new style could be supported much easier using the following:
logger = logging.getLogger(style='{')
logger.misc('User {} logged in', username}
This is both
Changes by Mitar :
--
nosy: +mitar
___
Python tracker
<http://bugs.python.org/issue15881>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Mitar :
I would suggest improvement of mktime_tz to use calendar.timegm internally
instead of time.mktime. The problem is that on Windows mktime_tz fails with
"mktime argument out of range" for this code:
mktime_tz(parsedate_tz('Thu, 1 Jan 1970 00:00:00 GMT
Mitar added the comment:
GHC Haskell compiler is currently opting for a different solution: installing
an default empty handler which is cleared by exec automatically and signal
handler is restored back to SIG_DFL:
http://hackage.haskell.org/trac/ghc/ticket/4274
--
nosy: +mitar
Mitar added the comment:
Here is the concrete code how I imagined that:
http://code.djangoproject.com/ticket/13854
So this would be not made in code of `wraps` function, but would be contract
for implementers to do it, if they want to be visible (maybe they still do not
want that). And all
New submission from Mitar :
Sometimes it is useful to be able to check which decorators are already applied
to a function, especially when you are constructing them dynamically. I am
proposing that for all decorators in Python would be suggested that they
maintain a list of used decorators on
Mitar added the comment:
I would just like to add that I am also looking forwards to this feature.
--
nosy: +mitar
___
Python tracker
<http://bugs.python.org/issue2
26 matches
Mail list logo