Changes by Ethan Furman :
--
nosy: +gpolo, serhiy.storchaka, terry.reedy
___
Python tracker
<http://bugs.python.org/issue25464>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
Nope, that would be a bug.
--
assignee: docs@python -> ethan.furman
stage: -> test needed
type: -> behavior
___
Python tracker
<http://bugs.python.or
Ethan Furman added the comment:
Thanks for tracking that down.
After more research I'm inclined to leave the code as it is and revamp the docs
to clarify that while it may work, the results may not be what you want:
-- 8< ---
class Color(Enum):
red = 1
Changes by Ethan Furman :
Added file: http://bugs.python.org/file41048/issue25594.stoneleaf.03.patch
___
Python tracker
<http://bugs.python.org/issue25594>
___
___
Pytho
Ethan Furman added the comment:
Changed the wording slightly to indicate that looking up members on other
members is a bad idea.
--
Added file: http://bugs.python.org/file41064/issue25594.stoneleaf.04.patch
___
Python tracker
<h
Changes by Ethan Furman :
--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
title: Unconditionally set SSL_MODE_RELEASE_BUFFERS -> set
SSL_MODE_RELEASE_BUFFERS
___
Python tracker
<http://bugs.python.org/issu
Ethan Furman added the comment:
Other changeset f4b495ceab17 in default branch.
--
___
Python tracker
<http://bugs.python.org/issue25594>
___
___
Python-bug
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
<http://bugs.python.org/issue25
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 -&g
Changes by Ethan Furman :
--
title:
unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda ->
unexpected output using pythons ternary operator in combination with lambda
___
Python tracker
<http://bugs.python.org/issu
Changes by Ethan Furman :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue25898>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.python.org/issue25
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
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
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26005>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 wi
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 trac
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 &quo
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26123>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
These changes were made in issue21793.
--
___
Python tracker
<http://bugs.python.org/issue26123>
___
___
Python-bugs-list mailin
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
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.
--
___
P
Ethan Furman added the comment:
New changeset: 52dc28ee3c88
--
resolution: -> rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Ethan Furman added the comment:
New changeset e4c22eadc25c:
use public 'value'
--
___
Python tracker
<http://bugs.python.org/issue24840>
___
___
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26174>
___
___
Python-bugs-list mailing list
Unsubscribe:
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: +et
Ethan Furman added the comment:
Victor, patch was already attached. ;)
--
___
Python tracker
<http://bugs.python.org/issue26202>
___
___
Python-bugs-list mailin
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26186>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26252>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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".
--
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26331>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26352>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26362>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.python.org/is
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
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:
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 "cognit
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.
---
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
<h
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
_
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 !=
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
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.
--
resol
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 meth
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26571>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 pletho
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26632>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Ethan Furman added the comment:
Never mind.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26667>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.python.org/is
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 tr
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26823>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue26823>
___
___
Python-bugs-list mailing list
Unsubscrib
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
<http://bugs.python.org/is
Changes by Ethan Furman :
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue26823>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26860>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Quick review of patch looks good. I'll try to look it over more closely later.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26865>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue26879>
___
___
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
<http://bugs.python.org/is
Ethan Furman added the comment:
Thanks for catching that.
--
___
Python tracker
<http://bugs.python.org/issue26893>
___
___
Python-bugs-list mailing list
Unsub
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.f
Changes by Ethan Furman :
--
Removed message: http://bugs.python.org/msg237891
___
Python tracker
<http://bugs.python.org/issue23640>
___
___
Python-bugs-list m
Changes by Ethan Furman :
--
Removed message: http://bugs.python.org/msg240053
___
Python tracker
<http://bugs.python.org/issue23640>
___
___
Python-bugs-list m
Changes by Ethan Furman :
--
Removed message: http://bugs.python.org/msg239619
___
Python tracker
<http://bugs.python.org/issue23640>
___
___
Python-bugs-list m
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
<http://bugs.python.org/is
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
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/sou
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
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
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
Changes by Ethan Furman :
--
nosy: +barry, eli.bendersky
___
Python tracker
<http://bugs.python.org/issue26988>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 descript
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, f
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 a
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.
--
___
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
-
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 ch
Ethan Furman added the comment:
This seems to have changed in 3.3 (versions up to 3.2 return 274000).
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
This isn't a change to the API or any visible user behavior (besides
performance), so I don't see a reason to not add it to 3.4.
--
nosy: +barry, eli.bendersky
___
Python tracker
<http://bugs.python.o
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue9938>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Eli, did you ever make any progress with this? Anything you can post so
someone else can run with it if you don't have time?
--
___
Python tracker
<http://bugs.python.org/is
Ethan Furman added the comment:
Redid patch against current branch, fixing the typos I had in them.
Any reason not to move forward?
--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file38238/issue6549.stoneleaf.01.patch
___
Python
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23491>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Once this android Python is built, can it:
- be copied from/to other android devices?
- run without KBOX?
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
Code spiffied: added randomization routine that can be used after a sort to
test a different sort method (or the same one).
Larry, can this extra demo go into 3.4.4, or only 3.5?
--
nosy: +larry
Added file: http://bugs.python.org/file38256/issue19075
Ethan Furman added the comment:
Cyd, if you want to be a CPython/Android resource that's great.
If you don't have time for it, I completely understand. What I'm hoping for is
to take your initial efforts and build from there, as there are others who can
take what you've
Ethan Furman added the comment:
I will work on the build slave (note: it will definitely be /work/ so if anyone
has the resource and know-how to just do it, I will not be offended ;) .
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
I'm afraid I know next to nothing about git, so cannot help there.
I would think that it wouldn't be too hard for someone (such as Ryan or myself)
to forward port a set of 3.4.2 patches to 3.5 -- so whatever is easie
Ethan Furman added the comment:
Sounds great!
--
___
Python tracker
<http://bugs.python.org/issue23496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Yup. Also updated the turtledemo docs.
--
___
Python tracker
<http://bugs.python.org/issue19075>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
Yup, that sounds right! ;)
--
___
Python tracker
<http://bugs.python.org/issue23496>
___
___
Python-bugs-list mailing list
Unsub
Changes by Ethan Furman :
--
assignee: -> ethan.furman
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python
Ethan Furman added the comment:
Should __prepare__ be special-cased as a classmethod, like __new__ is? Is
there any reason to ever have __prepare__ /not/ be a classmethod?
--
___
Python tracker
<http://bugs.python.org/issue17
1601 - 1700 of 1868 matches
Mail list logo