[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: For int, the spec is: [[fill]align][sign][#][0][width][,][.precision][type] So, for "06d", "0" is matched as the literal 0, "6" is matched as width, and "d" is matched as type. For "\x00<6d", "\x00&qu

[issue21547] '!s' formatting documentation bug

2014-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest using whatever language explains what "u'%s' %obj" does. It's the same behavior. >From the SO question, given: class A(object): def __str__(self): return 'as str' def __unicode__(self):

[issue7094] Add alternate float formatting styles to new-style formatting.

2014-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to go ahead and close this. Alternate formatting was added to float and complex. I think leaving this issue open just confuses whether or not that support was added. I know I had to go back and double check. Since decimal never participat

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2014-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: I believe that comment was referring to the subject of this bug: $ ./python Python 3.4.1+ (3.4:bec6f18dd636, Jun 12 2014, 20:23:30) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more informat

[issue21748] glob.glob does not sort its results

2014-06-13 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that glob shouldn't sort. In addition, iglob definitely can't sort, and I don't think you want to have glob sort but iglob not sort. -- nosy: +eric.smith status: pending -> open ___ Pyt

[issue21798] Allow adding Path or str to Path

2014-06-18 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with David. And, it already works, but uses '/', not '+': >>> b / "_name.dat" PosixPath('/tmp/some_base/_name.dat') -1 to using + to be the equivalent of: >>> pathlib.Path(str(b) + "_n

[issue8913] Document that datetime.__format__ is datetime.strftime

2012-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: To Heikki Partanen excellent point in the review about date __format__ strings allowing you to combine date formatting with other types of formatting: This is a great point. It's the lack of this that (for example) requires the logging module to h

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: It might be more motivating if you (Xavier de Gaye) could let us know of a real-world problem caused by this behavior. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16514] Cryptic traceback when sys.path[0] is None

2012-11-20 Thread Eric V. Smith
Eric V. Smith added the comment: I agree it's a bug. And the fix looks good to me. Having said that: I haven't looked at the import.c version to verify what is happening. Does the test pass under 3.2? -- ___ Python tracker <http://bu

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-04 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue16612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11122] bdist_rpm should use rpmbuild, not rpm

2012-12-09 Thread Eric V. Smith
Eric V. Smith added the comment: I agree on just switching to rpmbuild, at least for 3.4. -- ___ Python tracker <http://bugs.python.org/issue11122> ___ ___ Pytho

[issue16675] Ship Python with a package manager

2012-12-13 Thread Eric V. Smith
Eric V. Smith added the comment: Because this is a new feature, it could only be added to Python 3.4. Changing versions. -- components: +Installation nosy: +eric.smith type: behavior -> enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python

[issue9856] Change object.__format__(s) where s is non-empty to a TypeError

2012-12-23 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the more overly restrictive I realize it is. If the type of the object really is "object", then it can use string formatting. It's only for non-objects that I want to add the error. I'll re-open it and give

[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we should close this as "won't fix" in 2.7. -- ___ Python tracker <http://bugs.python.org/issue7300> ___ __

[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: What Barry said. :) I haven't had time to check yet: but why does site.py need the __file__ attribute? Maybe that's the actual problem. -- ___ Python tracker <http://bugs.python.o

[issue16944] German number separators not working using format language and locale "de_DE"

2013-01-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think this issue should be closed, since we're doing as we're instructed by the OS. If someone wants to open a new issue for the "m" format specifier type, I'd support that. -- nosy: +eric.smith _

[issue16977] argparse: mismatch between choices parsing and usage/error message

2013-01-17 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't this really just an inappropriate use of a string instead of a list? If indeed this is in the documentation, it should be changed. I still don't like: >>> p.add_argument('a', choices=list('abc')) but at least it wo

[issue17005] Add a topological sort algorithm

2013-01-20 Thread Eric V. Smith
Eric V. Smith added the comment: +1 I'll note (by inspection only) your example code doesn't work under Python 3.x! :) (print as a statement) -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: I think ''.join() will always be faster than ''.format(), for a number of reasons (some already stated): - it doesn't have to pass the format string - it doesn't have to do the __format__ lookup and call the resulting function

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: I retract the datetime comment. Given what we're trying to accomplish, I think we only need to support types that are supported by 2.7's %-formatting. -- ___ Python tracker <http://bugs.python.

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: So it sounds like the use case is (as Glyph said in msg180432): - Provide a transition for users of 2.7's of str %-formatting into a style that's compatible with both str in 2.7 and bytes in 3.4. In that case the only options I see are to implement

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2013-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I think this change should not be made: it's a slippery slope, because there are thousands of places in the stdlib where a similar change could be made. It's the nature of duck typing that you're not going to get a great error message everywh

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Eric V. Smith
Eric V. Smith added the comment: +1 for PyIndex_AsLong() -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue4591> ___ ___ Python-bugs-list mailin

[issue18986] Add a case-insensitive case-preserving dict

2013-09-17 Thread Eric V. Smith
Eric V. Smith added the comment: On 09/17/2013 09:34 AM, R. David Murray wrote: > > R. David Murray added the comment: > > Because most often the time at which you want the original key is the point > at which you are about to re-serialize the data...so you need the value too.

[issue18986] Add a case-insensitive case-preserving dict

2013-09-17 Thread Eric V. Smith
Eric V. Smith added the comment: On 09/17/2013 10:12 AM, Eric V. Smith wrote: > On the other hand, I don't have a use case for the original key, anyway. > So I don't have a strong feeling about this, other than it feels odd > that the answer to the original question (I think

[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-20 Thread Eric V. Smith
Eric V. Smith added the comment: Can you print out sys.executable and sys.path in both cases, and post the results here? -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19

[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-21 Thread Eric V. Smith
Eric V. Smith added the comment: Glad to see it's working. -- resolution: fixed -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue19089] Windows: Broken Ctrl-D shortcut on Python 3

2013-09-25 Thread Eric V. Smith
Eric V. Smith added the comment: The Windows (and before it MS-DOS) EOF character is Ctrl-Z. Try that. Depending on the toolset you use, it might use Ctrl-D as EOF. Cygwin's python uses Ctrl-D. -- nosy: +eric.smith ___ Python tracker

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-25 Thread Eric V. Smith
Eric V. Smith added the comment: It's trying to be consistent on whatever platform it's on. I'd rather python.exe match all other text-based .exe's on Windows. We can't have it both ways. But I agree it's a hassle. Cross-platform is a problem that Cygwin is tryi

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-27 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as rejected. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: If you could write up a concrete proposal, including which format specifiers would be supported, that would be helpful. Would it be extensible with something like __bformat__? There's really quite a bit of work to be done to specify how this would

[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: Also, with the PEP 393 changes, the implementation will be much more difficult. Sharing code with str (unicode) will likely be impossible, or require much refactoring of the existing code. -- ___ Python tracker

[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: I've lost track what we were talking about. I thought we were trying to support b''.format() in 3.4, for a restricted set of arguments. I don't see how a third-party package is going to help, if the goal is to allow 3.4 to be source comp

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide some code which demonstrates this? It's easier to address this if we have known working (or non-working) examples. Thanks. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/is

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't strictly related to printing a tuple. It's the difference between str() and repr(): >>> print (u"äöü") # uses str äöü >>> print repr(u"äöü") u'\xe4\xf6\xfc' When the t

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread Eric V. Smith
Eric V. Smith added the comment: As Martin points out, your first example is printing a string, not a tuple. The parens here are not building a tuple, they are just used for grouping in the expression, and are not doing anything in this example. So my explanation still holds: everything is

[issue19232] Speed up _decimal import

2013-10-12 Thread Eric V. Smith
Eric V. Smith added the comment: Remember that one reason for importing the C version at the bottom of the python version is so that alternate implementations (PyPy, IronPython, Jython) could provide partial versions of the C (or equivalent) versions. By importing after the Python version

[issue19289] Incorrect documentation for format's fill character.

2013-10-18 Thread Eric V. Smith
New submission from Eric V. Smith: In http://docs.python.org/library/string.html#format-specification-mini-language, it says "The fill character can be any character other than ‘{‘ or ‘}’." But that's not actually true. It's only true when using str.format, as it does

[issue19289] Incorrect documentation for format's fill character.

2013-10-18 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 19238. -- ___ Python tracker <http://bugs.python.org/issue19289> ___ ___ Python-bugs-list mailing list Unsub

[issue19238] Misleading explanation of fill and align in format_spec

2013-10-18 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 19289. -- ___ Python tracker <http://bugs.python.org/issue19238> ___ ___ Python-bugs-list mailing list Unsub

[issue19238] Misleading explanation of fill and align in format_spec

2013-10-20 Thread Eric V. Smith
Eric V. Smith added the comment: Looks good to me. Thanks! -- ___ Python tracker <http://bugs.python.org/issue19238> ___ ___ Python-bugs-list mailing list Unsub

[issue19427] enhancement: dictionary maths

2013-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest you get consensus on this idea on the python-ideas mailing list first. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19

[issue19504] Change "customise" to "customize".

2013-11-05 Thread Eric V. Smith
New submission from Eric V. Smith: The python source code usually uses "customiz*" (341 instances) over "customis*" (19 instance, 8 of which are in logging). I realize "foolish consistency", and all that, but I think the documentation should all use the sam

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: It looks like you need to use double-backslashes everywhere in your path, or use single backslashes and raw strings (r""). -- nosy: +eric.smith resolution: -> invalid status: open -> closed ___ Pytho

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Apologies for reading too quickly. I've reopened this. -- resolution: invalid -> status: closed -> open ___ Python tracker <http://bugs.python.

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a small, stand-alone program that demonstrates the problem? In particular, I want to see how this filename is provided to logging. -- ___ Python tracker <http://bugs.python.org/issue19

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: invalid -> status: closed -> open ___ Python tracker <http://bugs.python.org/issue19528> ___ ___ Python-bugs-list

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Peter. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue6208] path separator output ignores shell's path separator: / instead of \

2013-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed with Nick. I think it's clear than any change to the behavior will have to take place inside os.path. I just don't know what that change would be. -- ___ Python tracker <http://bugs.python.

[issue19504] Change "customise" to "customize".

2013-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: This patch covers the files that Vinay did not update. -- Added file: http://bugs.python.org/file32677/customise-2.diff ___ Python tracker <http://bugs.python.org/issue19

[issue19640] Drop _source attribute of namedtuple

2013-11-18 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19640> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2013-11-18 Thread Eric V. Smith
Eric V. Smith added the comment: Looks good to me. -- ___ Python tracker <http://bugs.python.org/issue8402> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data

2013-11-18 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19638> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-19 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: While I think that the dotted_name restriction should be relaxed and it should instead be a style guide issue, I have to agree with Benjamin here: the difference in grammar complexity is zero and shouldn't drive the dec

[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2013-11-26 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue19729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14910] argparse: disable abbreviation

2013-11-27 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14910> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20811] str.format for fixed width float can return a string longer than the maximum specified

2014-06-20 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python

[issue21391] shutil uses both os.path.abspath and an 'import from' of abspath

2014-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: Shouldn't the existing calls to abspath() be changed to os.path.abspath()? Or are both patches meant to be applied? I don't think the first patch applies cleanly any more. In any event: the deprecation and test look good to me. So assuming we get r

[issue21391] shutil uses both os.path.abspath and an 'import from' of abspath

2014-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: Now that I think about it, maybe we don't need a deprecation warning. http://legacy.python.org/dev/peps/pep-0008/#public-and-internal-interfaces says: "Imported names should always be considered an implementation detail. Other modules must n

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2014-07-07 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think we can change the exception type in a bugfix release, if ever. I don't see much point in changing the exception type: it's just churn. I'm +1 for a better error message. I'm -0 on changing the error mes

[issue21979] SyntaxError not raised on "0xaor 1"

2014-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: 0xaand 1 is parsed as 0xaa nd 1 which is not valid syntax. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue21

[issue21979] SyntaxError not raised on "0xaor 1"

2014-07-14 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> resolved ___ Python tracker <http://bugs.python.org/issue21979> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21979] SyntaxError not raised on "0xaor 1"

2014-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: To be more clear: the parser takes the longest token that could be valid. Since "n" can't be part of a hex number, parsing stops there, returning "0xaa" as the first token. So: >>> 0xaaif 1 else 0

[issue21981] Idle problem

2014-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: Please respond to the other bug. No need to open a new bug when responding to an existing issue. Thanks. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Pytho

[issue21990] saxutils defines an inner class where a normal one would do

2014-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: Looks fine to me. Normally I'd define the class being returned before the function returning it, but it doesn't really make a difference. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue22090] Decimal and float formatting treat '%' differently for infinities and nans.

2014-07-27 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that Decimal is wrong here. PEP 3101 says the result should include the trailing '%'. -- ___ Python tracker <http://bugs.python.o

[issue22222] dtoa.c: remove custom memory allocator

2014-08-17 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue2> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would need to be implemented by adding bytes.__format__. I can't think of a way to make it work on bytes-like objects in general. -- ___ Python tracker <http://bugs.python.org/is

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not particularly wild about the .precision syntax either, but I think the feature is generally useful. Adding bytes.__format__ is exactly what "special output for bytes" _is_, as far as format() is concerned. Another option would be to inve

[issue22387] Making tempfile.NamedTemporaryFile a class

2014-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: Can you explain why you want to subclass them? -- nosy: +eric.smith type: -> enhancement ___ Python tracker <http://bugs.python.org/issu

[issue22418] ipaddress.py new IPv6 Method for Solicited Multicast Address

2014-09-16 Thread Eric V. Smith
Eric V. Smith added the comment: Changing to 3.5 only, as this is an API addition so it can only be added there. I think that raising an exception instead of retuning None for a multicast address would be a better API. Any chance you can write some tests? Thanks! -- nosy

[issue22466] problem with installing python 2.7.8

2014-09-22 Thread Eric V. Smith
Eric V. Smith added the comment: Where did you download the installer from? How are you running the installer? -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue22

[issue22515] Implement partial order on Counter

2014-10-01 Thread Eric V. Smith
Eric V. Smith added the comment: Is there some particular problem you're trying to solve, which this would make easier? Without a use case, I'm -1. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue22532] A suggested change

2014-10-01 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue22532> ___ ___

[issue22515] Implement partial order on Counter

2014-10-01 Thread Eric V. Smith
Eric V. Smith added the comment: No need to explain it. It sounds like it's not generally useful, so I'm still -1. -- ___ Python tracker <http://bugs.python.o

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: Where are you seeing this? On an Ubuntu 13.10 x86 box, I see: >>> complex(-0.0) (-0+0j) This is with 2.7.5+, 3.3.2+ (from Ubuntu distro), and with 3.5.0a0 and 3.4.2rc1+ built locally. -- ___ Python track

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: No problem! For completeness, I also see the correct behavior on cygwin 32-bit 2.7.3 and 3.2.3. I don't have access to a straight Windows version. -- ___ Python tracker <http://bugs.python.org/is

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith, mark.dickinson ___ Python tracker <http://bugs.python.org/issue22546> ___ ___ Python-bugs-list mailing list Unsub

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a result of changing the precision of str() to match repr(). 2.7 prints: '3.14159265359' -- ___ Python tracker <http://bugs.python.o

[issue22556] datetime comparison with 'None' returning a TypeError

2014-10-05 Thread Eric V. Smith
Eric V. Smith added the comment: You've identified the main problem: would None go first or last? Modify your key function to make the decision appropriate for you, returning either a very small or very large value for None, as appropriate. If you really want to see this behavior changed

[issue22557] Local import is too slow

2014-10-05 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue22557> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22562] Singleton pattern for namedtuple

2014-10-06 Thread Eric V. Smith
Eric V. Smith added the comment: You might want to check out https://bitbucket.org/ctismer/namelesstuple, which uses a similar approach. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue22

[issue19948] POSIX semantics of PATH search in execvpe is not respected

2013-12-10 Thread Eric V. Smith
Eric V. Smith added the comment: What platform is this on? Looking quickly through posix.execve (which is what I think gets called), it looks like it just calls C's execve(). Also, what's your use case for this? I realize it might be a standard behavior, but it seems like a bad

[issue19948] POSIX semantics of PATH search in execvpe is not respected

2013-12-11 Thread Eric V. Smith
Eric V. Smith added the comment: os.execvp calls os._execvpe which calls posix.execv which calls execv. At least that's how I think it works. -- ___ Python tracker <http://bugs.python.org/is

[issue19948] POSIX semantics of PATH search in execvpe is not respected

2013-12-11 Thread Eric V. Smith
Eric V. Smith added the comment: I know that. This is mostly just a note to myself so I can remember what I've looked at the next time I have a few moments to look at the bug. Or, anyone else who wants to track it down. -- ___ Python tracker

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: It seems to me that by giving it an __index__ method, you're saying it can be used as an integer. It's not surprising to me that hex(), oct(), and bin() would work with a Grade.F object. If anything, I'd say that more places should use __index__

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I think adding __index__ to d, i, o, u, U, and c is the correct thing to do here. -- ___ Python tracker <http://bugs.python.org/issue19

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: If you were going to make this change, I'd think you'd have to look for __index__ and then __int__. But I'll admit I haven't thought through all of the ramifications. It would be interesting to see wh

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not clear on this: is this a new feature you'd like to see, or is this documented behavior of a DictReader that's not working? If it's a new feature, the earliest it can be implemented is in 3.5.

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: My (poorly phrased) question really was: is resetting fieldnames documented to force a re-read of the column headers? I don't see that it is, so I'm going to call this a 3.5 enhancement request. I agree with David that we can't change DictRe

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, looking through Objects/unicodeobject.c, 'u', 'i', and 'd' are treated the same everywhere. -- ___ Python tracker <

[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2013-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think you want to either also testing the number of elements in t, or in just compare t to (row["a"], row["b"]) (untested). -- nosy: +eric.smith ___ Python tracker <http://bug

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2013-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: While I think this is an improvement, I don't think we can make this change in behavior at this stage in 3.4. Won't it have to go in 3.5? -- ___ Python tracker <http://bugs.python.o

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2013-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: I agree the behavior is bad and should be fixed. But it's a new feature that will break existing code, and 3.4 is in beta, and therefore feature freeze. Unfortunately, I think this has to go into 3.5, unless you can get Larry to grant you an exce

[issue20150] API breakage in string formatting with :s option

2014-01-06 Thread Eric V. Smith
Eric V. Smith added the comment: See issue 7994 and issue 9856. This behavior has been deprecated for a while, and is now an error. -- assignee: -> eric.smith resolution: -> invalid status: open -> closed ___ Python track

[issue20150] API change in string formatting with :s option should be documented in What's New.

2014-01-06 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, I missed the "should be documented" part of your message. That's true, and I'll leave this open. But I'll change it to a doc request and assign it accordingly. -- assignee: eric.smith -> docs@python components: +Doc

[issue20240] Whitespace ignored in relative imports: from.package import something is valid syntax

2014-01-13 Thread Eric V. Smith
Eric V. Smith added the comment: This is no different from other places in python where white space is optional. As long as the parser can tell the end of a token, there need not be white space before the next token. For example: >>> 1+2 3 >>> 1 + 2 3 However, if the pars

[issue20284] proof for concept patch for bytes formatting methods

2014-01-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue20284> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map

2014-01-31 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: it would have been nice to do this, but it's too late. Closing. -- nosy: +eric.smith resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python

<    18   19   20   21   22   23   24   25   26   27   >