Erik Carstensen added the comment:
thanks for the pointer and sorry for the noise! I'll review your text.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Erik Carstensen :
I can find partial information on how Python treats __main__.py here:
https://docs.python.org/3/library/__main__.html
However, it is not documented how python handles __main__.py when passing the
Python package to the interpreter without -m. If I have
New submission from Erik Carstensen :
If you call stop() on an already stopped event loop, then the next call to
run_forever will terminate after one loop iteration. I would expect the stop to
either be a nop, or to be invalid in this state (and raise an exception).
Example:
import asyncio
Erik Carstensen added the comment:
Would it make sense to make dataclasses iterable, like so?
def __iter__(self):
return (getattr(self, field.name) for field in fields(self))
With that in place, deprecating astuple would maybe be less disruptive
New submission from Erik Carstensen :
It seems that the 'dataclass.astuple' function does a deepcopy of all fields.
This is not documented. Two problems:
1. Dictionary keys that rely on object identity are ruined:
import dataclasses
@dataclasses.dataclass
class Foo:
key
New submission from Erik Carstensen sandb...@virtutech.com:
It's nice that ZipFile is a context manager in 2.7. It would be nice and more
consistent if the objects returned from ZipFile.open() were context managers
too.
--
components: Library (Lib)
messages: 106941
nosy: sandberg
Erik Carstensen sandb...@virtutech.com added the comment:
Sorry, my mistake, ZipExtFile is indeed a context manager: I ran into the
problem in 2.6, and checked whether it was fixed in 2.7; when quickly reading
zipfile.py I saw that only ZipFile had context manager methods, I missed
Erik Carstensen sandb...@virtutech.com added the comment:
Patch that makes the zipfile test consistently use with statements to handle
the return value of ZipFile.open().
--
keywords: +patch
Added file: http://bugs.python.org/file17529/with-ZipExtFile-in-test.patch
Erik Carstensen sandb...@virtutech.com added the comment:
Once I considered this approach, but problems was that
nFileIndexLow/High can change every time file handle is opened, so it's
not unique. See remarks in following page.
http://msdn.microsoft.com/en-us/library/aa363788%28VS.85%29.aspx
Erik Carstensen sandb...@virtutech.com added the comment:
Also, assertTrue has an alias failUnless which I personally find more
descriptive (I don't know if either form is preferred for inclusion in
Python though).
--
___
Python tracker rep
Erik Carstensen sandb...@virtutech.com added the comment:
Once I considered this approach, but problems was that
nFileIndexLow/High can change every time file handle is opened, so
it's not unique.
Ah, I see, then your approach makes sense.
There's another part of your patch that I don't
11 matches
Mail list logo