Ethan Furman added the comment:
Superseded by PEP467.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue20895>
___
___
Python-bugs-lis
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23030>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ncoghlan, rhettinger
___
Python tracker
<http://bugs.python.org/issue23030>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue15443>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
When reading this thread, keep in mind that most of it was taken up with
rejecting exposing the underlying data structure, which is not what this patch
does.
https://mail.python.org/pipermail/python-ideas/2014-December/030230.html
Ethan Furman added the comment:
Please do! Working examples are better than non-working ones. :)
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
While you're at it, could you also sign the contributors' license agreement?
https://www.python.org/psf/contrib/contrib-form/
--
___
Python tracker
<http://bugs.python.o
Ethan Furman added the comment:
No worries, thanks for following up.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Ethan Furman :
--
nosy: +belopolsky, ethan.furman, lemburg
___
Python tracker
<http://bugs.python.org/issue23084>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
I haven't reviewed the patch yet, but I believe the intent is not for better
sleep support, but simply to be able to create and record time data which
contains nano-seconds.
python-dev discussion here:
https://mail.python.org/pipermail/python-dev
Ethan Furman added the comment:
Just keep the word nanasecond in there somewhere, as that is the motivating
purpose behind the patch.
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
If I am reading data from an external device that has nanosecond resolution,
how would I create such a time stamp in Python right now?
--
___
Python tracker
<http://bugs.python.org/issue23
Ethan Furman added the comment:
Enums (and other numeric subclasses), do not round-trip back to themselves. An
IntEnum with the value of 4 is written as 4 and converted back from json as the
integer 4 (not Settings.TabSpaces, or whatever).
Given that json is multi-language format (or a
Ethan Furman added the comment:
Raymond Hettinger added the comment:
---
> This bug report isn't a JSON spec issue; rather, it is about how the JSON
> module API can
> support (or inhibit) valid use cases.
>
> AFAICT, the patch to make th
Ethan Furman added the comment:
`or` does not return the last item evaluated -- it returns the first truthy
item, or, if no truthy items, the last false item:
--> 0 or {}
{}
--> 0 or 1 or {}
1
--
nosy: +ethan.furman
___
Python t
Ethan Furman added the comment:
Apologies, my wording was poor -- the last item evaluated is the one returned,
but all items may not be evaluated. As soon as the answer is known Python
stops evaluating any remaining items.
So in the example:
--> string1, string2, string3 = ''
Ethan Furman added the comment:
Here is what I have so far:
- complete tests for bytes and bytearry (bytearray currently commented out at
line 71)
- pep461 implemented for bytes
This is basically an adaptation of the 2.7 code for str, adjusted appropriately.
I was planning on having
Ethan Furman added the comment:
Sorry, no. And time is scarce at the moment so figuring out server-side clones
will have to wait as well.
I uploaded the patch of what I have so far -- hopefully that will be helpful.
Also attaching patch with just the tests.
--
Added file:
http
New submission from Ethan Furman:
Proposal:
math.nan = float('nan')
math.inf = float('inf')
Guido's approval:
https://mail.python.org/pipermail/python-ideas/2015-January/030775.html
Followup question:
Do we add a math.neginf, or somesuch, for float('-
New submission from Ethan Furman:
The help() function explains range as being a "virtual sequence", but that
phrase cannot be found anywhere in the docs.
Suggestion is to insert a phrase below:
>> The advantage of the range type over a regular list or tuple is
>> that
Ethan Furman added the comment:
Update: per Guido, we need to drop the word "virtual" from the help() for
range.
--
___
Python tracker
<http://bugs.python.o
Ethan Furman added the comment:
On 01/09/2015 09:39 AM, Guido van Rossum wrote:
> Please don't add this to the glossary and don't start using "virtual" (it is
> my favorite example of terminology gone wrong in C++ as well as in colloquial
> language). The terminolo
Ethan Furman added the comment:
Others have chimed in for removal of the word "virtual", with the Best In Class
comment going to Guido for:
> To me it is a poisonous buzzword that we're better without.
> It has virtually no semantics left. :-)
--
assignee: docs@
Changes by Ethan Furman :
--
nosy: +eric.smith, lemburg, rhettinger, stutzbach
___
Python tracker
<http://bugs.python.org/issue23185>
___
___
Python-bugs-list m
Ethan Furman added the comment:
I've been digging into this over the last week and come to the realization that
I won't be able to finish this patch. My apologies.
Victor, can you take over? I would appreciate it.
The tests I have written are only for the Python side. The p
Ethan Furman added the comment:
Removed the new ABI functions, all new functions are static.
Duplicated bytes code in bytearray.
in-place interpolation returns new bytearray at this point.
I'll work on getting in-place working, but otherwise I'll commit this in a week
so we have so
Ethan Furman added the comment:
Combined the second and last lines, discarded duplication.
--
nosy: +ethan.furman
versions: +Python 3.5
Added file: http://bugs.python.org/file37711/issue17546.stoneleaf.01.patch
___
Python tracker
<h
Ethan Furman added the comment:
3.5 is almost here; Raymond, care to make a ruling?
--
___
Python tracker
<http://bugs.python.org/issue18986>
___
___
Python-bug
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue17576>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue20680>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue20773>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Ethan Furman :
--
keywords: +patch
stage: needs patch -> patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file37712/issue17422.stoneleaf.01.patch
___
Python tracker
<http://bugs.python.org/issu
Ethan Furman added the comment:
Changed 'no value may be returned' to 'no non-None value may be returned'.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<h
Changes by Ethan Furman :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue22988>
___
___
Python-bugs-list
Ethan Furman added the comment:
Thank you, Simeon!
--
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue22997>
___
__
Changes by Ethan Furman :
--
resolution: -> fixed
___
Python tracker
<http://bugs.python.org/issue22997>
___
___
Python-bugs-list mailing list
Unsubscrib
Ethan Furman added the comment:
Better patch, along the lines of my original thought:
- byarrayformat converts bytearray to bytes
- calls bytesformat (now _PyBytes_Format) to do the heavy lifting
- uses PyByteArray_FromObject to tranform back to bytearray
Now working on in-place format
Ethan Furman added the comment:
Here's the patch -- the code for % and %= is in place for bytes and bytearray;
I still need to get the doc patch done. I'll commit Wednesday-ish barring
problems.
Big question
Background
--
There is a Python C ABI funct
Ethan Furman added the comment:
Thanks, Victor, for the feedback.
I was able to figure out some more of the C side thanks to Georg, and I think
the code is looking pretty good.
There may be room for optimization by having the bytes code call the unicode
implementation for more of the
Ethan Furman added the comment:
Currently the way to add an Enum's members to a module's namespace is:
globals().update(MyEnumeration.__members__)
but that seems quite ugly. Is there anywhere else that the user is required to
use __xxx__ methods for common functionality?
I t
Ethan Furman added the comment:
Amusingly enough, I posted a question/answer to StackOverflow
(http://stackoverflow.com/q/28130683/208880) and so far the only other
respondent posted an answer with similar functionality to my own, and also
recommended that such a method be added to the base
Ethan Furman added the comment:
it does seem a bit odd -- on the other hand, %s is an alias for %b, is
deprecated for new 3-only code, and this might help serve as a reminder of that.
Or we could fix it. ;)
--
___
Python tracker
<h
Ethan Furman added the comment:
I know nothing about this part of CPython, but wouldn't the correct solution be
to not compare by identity?
--
___
Python tracker
<http://bugs.python.org/is
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23334>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue11145>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23342>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
I haven't checked the code, but does check_output and friends combine stdout
and stderr when ouput=PIPE?
--
___
Python tracker
<http://bugs.python.org/is
Changes by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23354>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Tried running tests, tests that failed with patch:
test_ast
test_collections
test_extcall
test_grammar
test_importlib
test_parser
test_syntax
test_unpack_ex
test_zipfile
Running Ubuntu 13.04 (GNU/Linux 3.8.0-22-generic x86_64
Ethan Furman added the comment:
Argh -- I applied the patch, but didn't recompile. Doing that now...
--
___
Python tracker
<http://bugs.python.org/i
Ethan Furman added the comment:
Thanks, Terry! I'll do that next time -- after I make sure and re-compile. :/
--
___
Python tracker
<http://bugs.python.org/i
Ethan Furman added the comment:
All test pass on my system. :)
--
___
Python tracker
<http://bugs.python.org/issue2292>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
https://docs.python.org/3/library/calendar.html#calendar.monthrange
--
nosy: +ethan.furman
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Ethan Furman added the comment:
To make sure I understand correctly:
On platform ABC the value 1 could mean SOCK_STREAM but on platform XYZ
SOCK_STREAM is value 32?
Assuming the need to pickle socket types is not new, then people have been
doing it, possibly with painful workarounds, on the
Ethan Furman added the comment:
Without having looked at the code I would guess the fix is as simple as
changing a %s to a %d.
Having said that, it would be nice if the name was also in the log -- something
like:
127.0.0.1 - - [08/Feb/2015 05:05:28] "GET / HTTP/1.1&quo
Ethan Furman added the comment:
An IntEnum is just a fancy int. You can add them, subtract them, multiply
them, all that kind of thing.
If you attempt to unpickle a 3.4 _PickleByNameIntEnum on a 3.3 system, what's
going to happen?
--
___
P
Ethan Furman added the comment:
As long as it works I have no objections. :)
--
___
Python tracker
<http://bugs.python.org/issue23383>
___
___
Python-bugs-list m
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23455>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Sometimes practicality wins; it's why we allow %s, and we should also allow %r.
Both %s and %r need to be clearly documented as an aid to Py2/3 code bases, and
not recommended for new code.
Serhiy, do you have time to take of
Changes by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issue23467>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23486>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Craig Holmquist wrote:
-
> The consumer of that iteration processes each object with a switch-case-like
> comparison of the category, checking it sequentially against each instance
> of the Enum.
So for every object you compare agai
Ethan Furman added the comment:
Yup, you have it figured out. It's the lookup that is the slowdown.
When performance is an issue one of the standard tricks is to create a local
name, like you did with "tiny = Category.tiny".
For the curious (taken from the docstring for E
Ethan Furman added the comment:
Out of curiousity I tried: took two new lines, one modified line, and one
comment. :)
--
keywords: +patch
Added file: http://bugs.python.org/file38182/issue23486.stoneleaf.01.patch
___
Python tracker
<h
Ethan Furman added the comment:
Oh, and the slowdown dropped from 20 to 3 (for non-DynamicClassAttributes --
which is probably more than 99% of them).
--
___
Python tracker
<http://bugs.python.org/issue23
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue23496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
On the SO question [1] the OP stated that he tried errorlevel of both 1 and 2
with no effect... however, he was using Python2.6.
Martin, can you run that same test with 2.6 to verify that errorlevel did not
work there, but does now?
[1] http
Ethan Furman added the comment:
Actually, the OP was using 2.7.6.
--
___
Python tracker
<http://bugs.python.org/issue24259>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
I ran the OP's code in 2.7, 3.3, 3.4, and 3.5, as well as using ubuntu's gnu
tar 1.27.1:
gnu tar did not report any errors.
Python (all tested versions) did not report any errors (with the errorlevel
parameter missing, set to 1, an
Ethan Furman added the comment:
I took an existing tar file and chopped it in half with `head -c`. I was able
to extract half the files, but I didn't check the viability of the last file as
I was looking for tar or python error fee
Ethan Furman added the comment:
Do you mean something like:
--> def heh():
... yield [1, 2, 3]
...
--> for i in heh():
... print(i)
...
[1, 2, 3]
# *grumble*
--> def heh():
... for i in [1, 2, 3]:
... yield i
...
--> for i in heh():
... print(i)
...
1
2
3
If so
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24329>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
I was waiting a couple days to give Mital a chance to clarify if some other
behavior was intended.
--
___
Python tracker
<http://bugs.python.org/issue24
Ethan Furman added the comment:
If somebody wants their class to support being turned into a list, the obvious
answer is to have that class support iteration, and there are already three
ways to do that:
- supply an __iter__ that returns a separate iterator
- supply an __iter__/__next__
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24336>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
The recipe will work in simple situations.
In more complex situations:
- infinite iterator
- really large iterator (millions of items)
- high work load to produce next iteration
the recipe will either have a severe impact on performance or fail entirely
Ethan Furman added the comment:
The recipe creates a list before it ever starts processing, while
Executor.filter() starts processing with the first item.
--
___
Python tracker
<http://bugs.python.org/issue24
Ethan Furman added the comment:
Failing to find any matches with a pattern is an entirely different class of
error than finding matches but hitting permission problems or broken links or
suddenly deleted files or ...
If glob doesn't already have a 'failglob' option we could add
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24450>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +brett.cannon, eric.snow, ethan.furman, ncoghlan
___
Python tracker
<http://bugs.python.org/issue24492>
___
___
Python-bug
Ethan Furman added the comment:
'read'/'write' is sufficient.
+1 for the proposal.
--
nosy: +ethan.furman
___
Python tracker
<http://bug
Ethan Furman added the comment:
Nowhere else in the stdlib is 'readfd' defined, and 'writefd' is only used once
in a test.
I think tacking on the 'fd' is both too low level as well as misleading since
these are not file descriptors.
If there is no agreement
Ethan Furman added the comment:
Okay, scratch the "not file descriptors" part of my comment, but the rest still
stands.
--
___
Python tracker
<http://bugs.python.o
Ethan Furman added the comment:
As for Niki's example:
-
--> src = os.pipe()
--> src
(3, 4)
--> if not hasattr(src, 'read'): src = open(src)
...
Traceback (most recent call last):
File "", line 1,
Ethan Furman added the comment:
Brian, given my comments in msg245016 are you willing to add the
Executor.filter() function?
--
versions: +Python 3.6 -Python 3.5
___
Python tracker
<http://bugs.python.org/issue24
Ethan Furman added the comment:
The error in the example code was in
def __init__(self):
self.data = ...
In order to get around that issue, either `data` needs to be declared at class
scope, or special cased in __getattr__.
--
nosy: +ethan.furman
resolution: -> not a
Ethan Furman added the comment:
Is it too late to have the default for that option be to not allow the
replacement? That would be the safer course.
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue24
Ethan Furman added the comment:
Sure. I just saying that
@f.register(int, replace=True)
requires opt-in to replacing, whilst
@f.register(int, replace=False) # don't replace if one already exists
is still prone to bugs.
--
___
Python tr
Ethan Furman added the comment:
Ah, I see.
So you say up-front if you are willing to have redefinition occur later.
That doesn't feel like a consenting-adults attitude, and could also make
testing harder.
I prefer adding an option to the register method, and move towards making the
de
Ethan Furman added the comment:
RDM noted:
-
> The surprising thing is that __main__ works without there being an
> __init__. I didn't know that, assumed it wasn't true, and so never
> tried it.
I think this is due to PEP 420
New submission from Ethan Furman:
Per Nick's suggestion here is the patch to remove the "assret" check, but leave
the "assert" check in place.
As Terry summarized:
> 1. It is false that 'assret' is necessarily a typo. Someone might quite
> legitimate
Ethan Furman added the comment:
Better patch: fixes NEWS, tests, and docs, as well as the code.
--
Added file: http://bugs.python.org/file39945/remove_assret.stoneleaf.02.patch
___
Python tracker
<http://bugs.python.org/issue24
Changes by Ethan Furman :
--
stage: -> patch review
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue24656>
___
___
Python-bugs-list
Ethan Furman added the comment:
Addressed comments from berker.peksag.
--
Added file: http://bugs.python.org/file39948/remove_assret.stoneleaf.03.patch
___
Python tracker
<http://bugs.python.org/issue24
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue22609>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue14010>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue24632>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue24597>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: -ethan.furman
___
Python tracker
<http://bugs.python.org/issue24536>
___
___
Python-bugs-list mailing list
Unsubscribe:
1401 - 1500 of 1868 matches
Mail list logo