[issue27186] add os.fspath()
Ethan Furman added the comment: Jelle: the DirEntry patch looks good so far, but it needs a test for a bytes path. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27186] add os.fspath()
Ethan Furman added the comment: New changeset 00991aa5fdb5 by Ethan Furman in branch 'default': issue27182: update fsencode and fsdecode for os.path(); patch by Dusty Phillips https://hg.python.org/cpython/rev/00991aa5fdb5 (had wrong issue # in commit) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg267280 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27186] add os.fspath()
Ethan Furman added the comment: Dusty: The pathlib tests looks like it's only testing the PurePath implementation; while this /should/ be sufficient, please add tests for the other classes as well. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27184] Support path objects in the ntpath module
Ethan Furman added the comment: The expected scenario, and the purpose of os.fspath(), is to enable high-level libraries to not know or care if they receive a pathlib object or a string. In other words, they already have os.path.join() and os.path.split() calls, and currently break noisily if a pathlib.Path is passed in; by enhancing os.path to accept a pathlib.Path object that high-level library can start working with pathlib.Path objects without changing a thing, which means the user of that library can use pathlib.Path painlessly. Unless I have seriously misunderstood something, os.path will be changed to work with __fspath__ objects. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: Sorry, Serhiy, I had my module names mixed up. `nt` and `posix` are the same, but `ntpath` and `posixpath` are not (I may have those first two names wrong again, but hopefully you get the idea). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27186] add os.fspath()
Ethan Furman added the comment: Note: My schedule changed -- I won't be at the sprints today, but tomorrow. I'll finish reviewing these patches and commit this afternoon if no one beats me to it. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27184] Support path objects in the ntpath module
Ethan Furman added the comment: @Serhy: Isn't that backwards? I would think that by doing os.path first most other libraries would not have to change. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26266] add classattribute to enum to handle non-Enum attributes
Ethan Furman added the comment: One possible downside to the `classattribute` route is that we have a descriptor whose only purpose is to shield the item from becoming a member; the up-side is that it's simple to implement. Another possibility is `skip`: class skip: """ Protects item from becaming an Enum member during class creation. """ def __init__(self, value): self.value = value def __get__(self, instance, ownerclass=None): return self.value The advantage is that it is replaced by the metaclass with the stored value, so we have no extraneous descriptor after the Enum is created; the downside is that it requires change in the metaclass to do the right thing. Thoughts? -- stage: -> needs patch type: behavior -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26266> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: Nope. There is a posixpath.py and an ntpath.py, and they are not the same. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27186] add os.fspath()
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: test needed status: open title: add os.fspath() type: enhancement versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: os.fspath(): issue27186 -- dependencies: +add os.fspath() ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27184] Support path objects in the nt module
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: behavior -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Changes by Ethan Furman <et...@stoneleaf.us>: -- dependencies: +Support Path objects in the posix module, Support path objects in the nt module, Update importlib to accept pathlib.Path objects type: -> behavior versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: behavior -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: nt module: issue27184 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27184] Support path objects in the nt module
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: test needed status: open title: Support path objects in the nt module type: behavior versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: importlib: issue26667 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
Ethan Furman added the comment: posix module: issue26027 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27182] PEP 519 support in the stdlib
New submission from Ethan Furman: Meta issue to track adding PEP 519 support in the various stdlib modules. -- messages: 266891 nosy: brett.cannon, ethan.furman, serhiy.storchaka priority: normal severity: normal status: open title: PEP 519 support in the stdlib ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26027] Support Path objects in the posix module
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22570] Better stdlib support for Path objects using .path attribute
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman title: Better stdlib support for Path objects -> Better stdlib support for Path objects using .path attribute ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22570> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27161] Confusing exception in Path().with_name
Ethan Furman added the comment: I think the request is to raise a single PathlibError instead of the broad range of possible errors. Something like: try: blah blah except TypeError as e: raise PathlibError(str(e)) Since pathlib is a high level library this seems appropriate. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27161> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23990] Callable builtin doesn't respect descriptors
Ethan Furman added the comment: The BDFL would be the BDFL (Guido van Rossum ;) or whomever he asks to do the job. Don't worry too much about drafts. Pick one of the existing PEPs (409 is fairly short), and follow the same type of layouts. Make your arguments for what should be changed and why, then post it to Python-Ideas for initial discussion. As points come up either for or against it you'll add those to your draft PEP. If -Ideas doesn't kill it you can then post your most up-to-date draft to Python-Dev for the next round of discussion. Make sure to have examples of the desired behavior, and decent arguments to refute the objections already raised in this issue. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23990] Callable builtin doesn't respect descriptors
Ethan Furman added the comment: I'm not against them, but there are many diverse opinions. A PEP will: - broaden discussion, so all (or at least most) pros and cons can be considered - highlight any other pieces of Python that would need to change to properly support proxies - get a pronouncement by the BDFL (or a delegate) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23990] Callable builtin doesn't respect descriptors
Ethan Furman added the comment: `issubclass` doesn't "do the right thing", as evidenced by another dev. Continued complaining to this issue is not going to get you what you want, but writing a PEP to address the issue might. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23990] Callable builtin doesn't respect descriptors
Ethan Furman added the comment: To change this behavior at this point will require a PEP. The PEP should be something along the lines of "Add proxy support to builtins" and should address such things as callable, issubclass, and whatever else is is appropriate. As for working around your problem now I see a few options: - write your own `is_proxy_callable` function - add a `.callable` method to your proxy class - a `resolve_proxy` function/method which can change the proxy class type to whatever is needed to mirror the actual object -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26988] Add AutoNumberedEnum to stdlib
Ethan Furman added the comment: It's in _EnumDict.__getitem__; there's some duplication in __setitem__ for supporting Python 2 (although with 2 you have to use either the empty tuple, or some other handy thing that may go in the __doc__ attribute, for example). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26988] Add AutoNumberedEnum to stdlib
Ethan Furman added the comment: On the other hand, if you use aenum you can do: class Color(AutoNumber): red green blue And isn't that better*? ;) * For those in danger of swallowing their tongue over the magic involved: The magic is turned off as soon as any descriptor is defined (property, function, etc.). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26988] Add AutoNumberedEnum to stdlib
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +barry, eli.bendersky ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26632] __all__ decorator
Ethan Furman added the comment: For the standalone version I suggest a disclaimer about the `from ... import *` ability. Something like: `from ... import *` should not be used with packages that do not have an __all__ unless they support that usage (check their docs). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26632> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26981] add compatibility shim for enum34 backport
Ethan Furman added the comment: It would, but that's not what we did. Currently we have _name_ and _value_; the backport uses __order__ because I didn't want the stdlib version having a hairball when someone tried to use a 2.7 Enum in 3.4 and it didn't occur to me at the time to just add and ignore _order_. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26981> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26981] add compatibility shim for enum34 backport
New submission from Ethan Furman: _sunder_ methods are reserved for internal Enum use, and if the user tries to use any an exception is raised. Consequently, the enum34 backport uses __order__ instead of _order_ to specify a definition order for its members. I would like to do two things: 1) add _order_ to the stdlib version 2) ensure the actual definition order is the same as what is specified in _order_ -- assignee: ethan.furman messages: 265174 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal stage: needs patch status: open title: add compatibility shim for enum34 backport type: behavior versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26981> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Ethan Furman added the comment: With the patch: --> import enum --> class Huh(enum.IntEnum): ... blah = 2 ... --> Huh.blah.from_bytes(b'\04', 'big') Traceback (most recent call last): File "", line 1, in File "/home/ethan/source/python/issue23640/Lib/enum.py", line 222, in __call__ return cls.__new__(cls, value) File "/home/ethan/source/python/issue23640/Lib/enum.py", line 457, in __new__ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: 4 is not a valid Huh This is not the correct behavior. An IntEnum should act like an int, and in cases where it can't and still be an IntEnum, it becomes an int. But this behavior is Enum specific, and I would not expect other int subclasses to need or want that behavior. Also, in cases where class methods are alternate constructors there is no requirement that they go through the main __new__/__init__ constructors to do their job. In other words, if IntEnum.from_bytes (which is inherited) is not behaving correctly, it is up to IntEnum to fix it -- it is not the job of int, and this is not a bug in int. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Ethan Furman added the comment: I think the classmethod-as-constructor behavior is correct, so it's up to IntEnum (or EnumMeta, or foo, or ...), to work around the issue. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Ethan Furman added the comment: 'from_bytes' is a classmethod. As such, it should return the same type as the class it is called on. If that wasn't the intent it would be a staticmethod instead. It is the responsibility of the subclass to override base class behavior, not the other way around. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg237891 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg240053 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Changes by Ethan Furman <et...@stoneleaf.us>: -- Removed message: http://bugs.python.org/msg239619 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23640] int.from_bytes() is broken for subclasses
Ethan Furman added the comment: Not sure what I was thinking at the time, but several of my comments were supportive of `classmethod`s not calling subclass' __new__; I actually do not think that, and am +1 on the patch. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator
Ethan Furman added the comment: Thanks for catching that. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple
Ethan Furman added the comment: I'm not clear on what you asking, but regardless we should have both the old (by-index) tests and new by-attribute tests. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26879] new message
Changes by Ethan Furman <et...@stoneleaf.us>: -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26879> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26865] Meta-issue: support of the android platform
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26865> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple
Ethan Furman added the comment: Quick review of patch looks good. I'll try to look it over more closely later. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26829] update docs: when creating classes a new dict is created for the final class object
New submission from Ethan Furman: https://docs.python.org/3/reference/datamodel.html#creating-the-class-object This section should mention that the final class is created with a new dict(), and all key/value pairs from the dict used during creation are copied over. -- assignee: docs@python components: Documentation messages: 264016 nosy: docs@python, ethan.furman priority: normal severity: normal status: open title: update docs: when creating classes a new dict is created for the final class object versions: Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26829> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26823] Shrink recursive tracebacks
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +georg.brandl ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26823] Shrink recursive tracebacks
Ethan Furman added the comment: If you can, give it a go. Make it a new patch, though -- don't delete the existing one. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26823] Shrink recursive tracebacks
Changes by Ethan Furman <et...@stoneleaf.us>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26823] Shrink recursive tracebacks
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26748] enum.Enum is False-y
Ethan Furman added the comment: Enum classes are now Truth-y in 3.4, 3.5, enum34, and aenum. :) -- assignee: -> ethan.furman resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26748] enum.Enum is False-y
Ethan Furman added the comment: EnumMeta /is/ a collection (at least in the same sense the dict class is a collection). ;) Fix is on it's way... -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26667] Update importlib to accept pathlib.Path objects
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26667> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26684] pathlib.Path.with_name() and .with_suffix do not allow combining with an empty Path
Ethan Furman added the comment: Never mind. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26684> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26684] pathlib.Path.with_name() and .with_suffix do not allow combining with an empty Path
New submission from Ethan Furman: The methods .with_name() and .with_suffix() of pathlib.Path (and friends) do not allow a name or suffix to be added to a path alone -- I get ValueError(... has an empty name...). This is the documented behavior, but it seems incredibly user-unfriendly. -- messages: 262717 nosy: ethan.furman, pitrou priority: normal severity: normal status: open title: pathlib.Path.with_name() and .with_suffix do not allow combining with an empty Path type: behavior versions: Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26684> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26681] decorators for attributes
Ethan Furman added the comment: Please discuss this idea on the Python-Ideas mailing list first; if that goes well you can bring the idea to Python-Dev; if that also goes well feel free to reopen this issue. --- In the meantime you could probably do something with a custom descriptor/class decorator pair; if you need help with that you could try the Python-List or StackOverflow. -- nosy: +ethan.furman resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26681> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26632] __all__ decorator
Ethan Furman added the comment: Not a fan. :/ How about getting your own copy of the public decorator initialized with the globals you pass in? class Public: def __init__(self, module): """ module should be the globals() dict from the calling module """ self.module = module self.module.setdefault('__all__', []) def __call__(self, thing, value=None): if isinstance(thing, str): self.module[thing] = value else: self.module[thing.__name__] = thing and in use: public = Public(globals()) @public def baz(a, b): #blah blah public('CONST1', 2) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26632> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26632] __all__ decorator
Ethan Furman added the comment: def public(thing, value=None): if isinstance(thing, str): mdict = sys._getframe(1).f_globals name = thing mdict[name] = thing # no need for retyping! ;) else: mdict = sys.modules[thing.__module__].__dict__ name = thing.__name__ dunder_all = mdict.setdefault('__all__', []) dunder_all.append(name) return thing @public def baz(a, b): return a+ b public('CONST1', 3) CONST2 = 4 On the down side, you know somebody is going to @public a class' method -- how do we check for that? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26632> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26632] __all__ decorator
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26632> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26614] False/0 and True/1 collision when used as dict keys?
Ethan Furman added the comment: False and True are subtypes of int, so the behaviour you are seeing is known and expected. https://docs.python.org/2/reference/datamodel.html?highlight=bool In the future feel free to ask on Python-List about behaviour -- you'll be sure to get a plethora of answers. -- nosy: +ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26614> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26571] turtle regression in 3.5
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26571> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26540] Python Macros
Ethan Furman added the comment: That particular use-case is easily handled by simply creating the correct function/method based on the criterion: if py_ver < 3.6: def fribbletz(): # do something in a 3.0-3.5 compatible way else: def fribbletz(): # otherwise use 3.6 methods One possible up-side would by if macros were able to allow not erroring out when new syntax was used in the False branch; but really, we add new syntax so rarely even that is probably not worth it. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26540> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26521] add `extend_enum` to Enum
Ethan Furman added the comment: Barry: po-tay-to / po-tah-to ;) Serhiy: The set is known and finite, just scattered over different expensive-to-load modules. Decision: Since no one is jumping up and down with anticipation over this feature, I'll let it stay on SO. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26521> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26521] add `extend_enum` to Enum
New submission from Ethan Furman: In this SO question [1] the OP has a need to generate an Enum lazily. I created an `extend_enum` function to do so. By the time I was done I realized I would not want anyone to have to create that function by hand, nor keep it up to date (should we ever change the implementation details). Should we add this to the stdlib? Note that this does not change anything about subclassing Enum. [1] http://stackoverflow.com/q/28126314/208880 -- assignee: ethan.furman messages: 261464 nosy: barry, eli.bendersky, ethan.furman priority: low severity: normal status: open title: add `extend_enum` to Enum versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26521> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26514] Object defines '__ne__' as 'not __eq__' if '__ne__' is not implemented
Ethan Furman added the comment: The following behaviour is from 3.5: --> class Huh: ... def __eq__(self, other): ... return other == 'blah' ... --> h = Huh() --> h == 'ew' False --> h != 'ew' True --> h == 'blah' True --> h != 'blah' False Which seems to be exactly what you want. Do you have a counter-example? -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26490] Leading “0” allowed, only for decimal zero
Ethan Furman added the comment: Short answer: rationale unknown, but any number of zeroes is still unambiguously zero. Closing as duplicate. -- nosy: +ethan.furman resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26490> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()
Ethan Furman added the comment: I like those code snippets! Thanks, Serhiy! Just to make sure I have understood correctly: every decimal char is also a digit char, but some digit chars are not decimal chars. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26483> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26483] docs unclear on difference between isdigt() and isdecimal()
New submission from Ethan Furman: The docs use different explanations for what constitutes a decimal verses a digit character; consequently I can't tell if they are the same or different, and if different what the differences are. --- https://docs.python.org/3/library/stdtypes.html?#str.isdecimal Return true if all characters in the string are decimal characters and there is at least one character, false otherwise. Decimal characters are those from general category “Nd”. This category includes digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. --- https://docs.python.org/3/library/stdtypes.html?#str.isdigit Return true if all characters in the string are digits and there is at least one character, false otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. Formally, a digit is a character that has the property value Numeric_Type=Digit or Numeric_Type=Decimal. -- messages: 261195 nosy: ethan.furman priority: normal severity: normal status: open title: docs unclear on difference between isdigt() and isdecimal() versions: Python 3.4, Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26483> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26362] Approved API for creating a temporary file path
Ethan Furman added the comment: I don't see the problem. Every Python platform that has `mktemp` has an implementation to generate the names, and that implementation can become the public face instead of `mktemp`. So no more of a burden than `mktemp` is; likewise for the "cognitive burden". As far as appropriate location -- where else would you put it? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26362> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26362] Approved API for creating a temporary file path
Ethan Furman added the comment: > The request is for a “get the next path generated by a > ‘tempfile._get_candidate_names’ generator”, with an approved and > documented public API. I don't see any problem with this. Patches welcome. -- stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26362> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26447] rstrip() is pilfering my 'p'
Ethan Furman added the comment: https://docs.python.org/3/library/stdtypes.html#str.strip - [...] The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped: -- nosy: +ethan.furman resolution: -> not a bug status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26380] Add an http method enum
Ethan Furman added the comment: I don't have a firm opinion at this point -- can you give a few examples of how this will help in code? -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26380> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26362] Approved API for creating a temporary file path
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26362> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26352] getpass incorrectly displays password prompt on stderr on fallback
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26352> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26331] Tokenizer: allow underscores for grouping in numeric literals
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26331> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26324] sum() incorrect on negative zeros
Ethan Furman added the comment: If one is using sum on floats, and a list of -0.0's is a possibility, and the sign matters... well, I would hope that one is using -0.0 as the start value. I don't think this is worth "fixing". -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26324> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26266] add classattribute to enum to handle non-Enum attributes
New submission from Ethan Furman: The rules for what objects in an Enum become members and which do not are fairly straight-forward: __double_underscore__ do not (but is reserved for Python) _single_underscore_ do not (but is reserved for Enum itself) any descriptored object (such as functions) do not Which means the proper way to add constants/attributes to an Enum is to write a descriptor, but most folks don't think about that when the Enum is not working properly they (okay, and me :/ ) just add the double-underscore. This question has already come up a couple times on StackOverflow: - http://stackoverflow.com/q/17911188/208880 - http://stackoverflow.com/q/34465739/208880 While this doesn't come up very often, that just means it is even more likely to have the attribute be __double_underscored__ instead of descriptored. The solution is have a descriptor in the Enum module for this case. While it would be possible to have several (constant-unless-mutable, constant-even-if-mutable, not-constant, possibly others) I think the not-constant would be sufficient (aka a writable property), although I am not opposed to a constant-unless mutable version as well. The not-constant version would look like this (I'll attach patch later): class classattribute: def __init__(self, value): self.value = value def __get__(self, *args): return self.value def __set__(self, value): self.value = value def __repr__(self): return '%s(%r)' % (self.__class__.__name__, self.value) -- assignee: ethan.furman messages: 259399 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal status: open title: add classattribute to enum to handle non-Enum attributes type: behavior versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26266> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26252] Add an example to importlib docs on setting up an importer
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26252> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26186] LazyLoader rejecting use of SourceFileLoader
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26186> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26202] The range() object is deepcopied as atomic
Ethan Furman added the comment: I don't have much experience with the copy module, but I don't see any problems with the code. Does copy.copy suffer from the same problem? If yes, is it fixed with this same patch, or is more work needed? -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26202> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26202] The range() object is deepcopied as atomic
Ethan Furman added the comment: Victor, patch was already attached. ;) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26202> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26174] Exception alias cause destruction of existing variable
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24840] implement bool conversion for enums to prevent odd edge case
Ethan Furman added the comment: New changeset e4c22eadc25c: use public 'value' -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26123] http.client status code constants incompatible with Python 3.4
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26123> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26123] http.client status code constants incompatible with Python 3.4
Ethan Furman added the comment: These changes were made in issue21793. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26123> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24840] implement bool conversion for enums to prevent odd edge case
Ethan Furman added the comment: Mike, my apologies. In the future I'll make sure and read the docs before I go through with changes. In the docs (https://www.python.org/dev/peps/pep-0435/#id35): The reason for defaulting to 1 as the starting number and not 0 is that 0 is False in a boolean sense, but enum members all evaluate to True. >From a newer discussion on Python Ideas and Python Dev: Barry Warsaw: I think in general enums are primarily a symbolic value and don't have truthiness. It's also so easy to override when you define the enum that it's not worth changing the current behavior. Guido van Rossum: Honestly I think it's too late to change. The proposal to change plain Enums to False when their value is zero (or falsey) would be a huge backward incompatibility. I don't think there's a reasonable path forward, and also don't think there's a big reason to regret the current semantics. Thank you, Gregory, for catching that. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26123] http.client status code constants incompatible with Python 3.4
Ethan Furman added the comment: Not using Enum's __str__ was discussed (I think during the initial Enum threads when PEP435 was being debated) and IIRC Guido was strongly against it as it took away half the purpose of using an Enum. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26123> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26044] Name mangling overrides externally defined names
Ethan Furman added the comment: Nice work with the debugging. but what you have proved is that Python is behaving exactly as designed [0]. While true that the current implementation does have the pitfall you have discovered, removing it is not worth the cost in complexity. The proper "fix" is not to have __vars outside of a class. [0] [https://docs.python.org/2/tutorial/classes.html#private-variables-and-class-local-references] -- resolution: not a bug -> rejected status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26044> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26022] string.replace(' ', ' ') has to be called 2 times before it works
Ethan Furman added the comment: The .replace() method is not recursive (it only makes one pass through the string), so for example: >>> example = ' ' # three spaces >>> example = example.replace(' ', ' ') # replace two spaces with one space >>> example # should be two spaces ' ' >>> example = example.replace(' ', ' ') # replace two spaces with one space >>> example # should be one space ' ' -- nosy: +ethan.furman resolution: rejected -> not a bug ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26022> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26032] Use scandir() to speed up pathlib globbing
Ethan Furman added the comment: As I recall, if the platform's DirEntry doesn't provide the cacheable attributes when first called, those attributes will be looked up (and cached) on first access. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26032> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25979] String functions lstrip are not working properly when you have escape sequence
Ethan Furman added the comment: lstrip() works by removing any of the characters in its argument, in any order; for example: 'catchy'.lstrip('cat') # 'hy' 'actchy'.lstrip('tac') # 'hy' is stripping, from the left, all 'c's and all 'a's and all 't's -- not just the first three, and order does not matter. The docs: https://docs.python.org/3/library/stdtypes.html?highlight=lstrip#str.lstrip -- nosy: +ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25979> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24840] implement bool conversion for enums to prevent odd edge case
Ethan Furman added the comment: The enum34 backport has been fixed to not have 3.6 only features (assuming the __bool__ change was the only one). Was that your only objection, or do you not want this change in 3.6 either? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25898] Check for subsequence inside a sequence
Ethan Furman added the comment: +1 for sequences +1 for subsequence_index instead of has_subsequence +1 for returning None when not found ;) -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25898> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25898] Check for subsequence inside a sequence
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +rhettinger ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25898> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25843] unexpected output using pythons ternary operator in combination with lambda
Changes by Ethan Furman <et...@stoneleaf.us>: -- title: unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda -> unexpected output using pythons ternary operator in combination with lambda ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25843> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25762] Calculation Mistake 1.5 * 0.3
Ethan Furman added the comment: Floating point calculations are not exact. https://docs.python.org/3/tutorial/floatingpoint.html https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html -- nosy: +ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25762> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25634] Add a dedicated subclass for attribute missing errors
Ethan Furman added the comment: Note for posterity: the current behavior of __getattr__ is what allows Enum to work correctly. -- nosy: +ethan.furman ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25634> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25594] enum instance attribute access possible
Ethan Furman added the comment: Other changeset f4b495ceab17 in default branch. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25594> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25672] set SSL_MODE_RELEASE_BUFFERS
Changes by Ethan Furman <et...@stoneleaf.us>: -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou title: Unconditionally set SSL_MODE_RELEASE_BUFFERS -> set SSL_MODE_RELEASE_BUFFERS ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25672> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com