[issue18738] % formatting incomplete for Enum

2013-08-14 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18738 ___ ___ Python-bugs-list

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: What is '{:}' supposed to mean? It should be the same as '{}'. That is, an empty format string. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18738

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think: '{:}'.format(AF.IPv4) 'AF.IPv4' is correct, assuming str(AF.IPv4) is 'AF.IPv4'. I'm not sure what: '{:10}'.format(AF.IPv4) should produce. There's a special case for an empty format string calling str(). I think that specifying __format__() would

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think that specifying __format__() would be best, except then you need to decide what sort of format specification language you want to support, and deal with all of the implementation details. Or, maybe just have Enum's __format__ be: def

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: For format, I think the question is should an IntEnum format like an int, with the wacky exception of a specifier of '', or should it always format like a str? I assumed we'd want it to look like the str() version of itself, always. But it's debatable. I

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think IntEnum should act like a str for format() purposes. After all, having a useful string representation is a prime reason it exists. If you want it to act like a str() sometimes, and an int() at others, you're going to have to parse the format specifier

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: If IntEnum.__format__ is going to parse the format string, it's a little fragile. For example, say we modify int.__format__ to understand a Z presentation type. Who's going to remember to update IntEnum.__format__? For reference, the existing integer formats

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it's possible for int (PyLong) to handle a decision to format itself as a string. Personally, I'd like this: format(3, 's') Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 's' for object of type

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18738 ___ ___ Python-bugs

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: The value of int is always used, except when the format string is empty. PEP 3101 explicitly requires this behavior. For all built-in types, an empty format specification will produce the equivalent of str(value). The built-in type here refers to int, since

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: So what you're saying is that '{:}' is empty, but '{:10}' is not? Yes, exactly. The part before the colon says which argument to .format() to use. The empty string there means use the next one. The part after the colon is the format specifier. In the first

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: It's not whether a field width is specified that makes it empty or not, it's where there's anything in the format specifier at all. I'm trying to simplify the conversation by using format() instead of str.format(), but I'm not succeeding! Going back

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-14 Thread Eric V. Smith
Eric V. Smith added the comment: In order to avoid that logic, and cause more format specifiers to result in str-like behavior, we'll need to implement an __format__ somewhere (IntEnum, I guess) that makes the int or str decision. If this is the way format is supposed to work, then I'll

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 5:46 PM, Eli Bendersky wrote: The whole point of IntEnum and replacing stdlib constants with it was friendly str repr out of the box. This means that just printing out an enum member should have a nice string representation. And just printing

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 7:09 PM, Ethan Furman wrote: Ethan Furman added the comment: Eric V. Smith added the comment: I think the answers should be: - Formats as int if the length of the format spec is = 1 and it ends in one of bdoxX (the int presentation types

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 8:20 PM, Ethan Furman wrote: The characters I list are the justification chars and the digits that would be used to specify the field width. If those are the only characters given then treat the MixedEnum member as the member string

[issue18750] '' % [1] doens't fail

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: Objects/unicodeobject.c has this, at line 14316: if (PyMapping_Check(args) !PyTuple_Check(args) !PyUnicode_Check(args)) ctx.dict = args; else ctx.dict = NULL; and later at line 14348: if (ctx.argidx ctx.arglen !ctx.dict

[issue18750] '' % [1] doesn't fail

2013-08-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- title: '' % [1] doens't fail - '' % [1] doesn't fail ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18750

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/16/2013 12:24 AM, Ethan Furman wrote: Ethan Furman added the comment: Eric V. Smith added the comment: But a datetime format string can end in 0, for example. format(datetime.datetime.now(), '%H:%M:%S.00') '20:25:27.00' Not a problem, because

[issue18750] '' % [1] doesn't fail

2013-08-16 Thread Eric V. Smith
Eric V. Smith added the comment: The code looks basically the same in 2.7, and there PyMapping_Check looks for __getitem__, so maybe issue 5945 is just incorrect in its analysis. In any event, I'm not sure this is worth fixing. There are lots of little corner cases that could be broken

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-19 Thread Eric V. Smith
Eric V. Smith added the comment: Oh, I don't feel my time has been wasted. Where else can I have a discussion of __format__? With this patch, given this: class UpperString(str): def __format__(self, fmt): return str.__format__(self, fmt).upper() class UpperEnum(UpperString, Enum

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-20 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/20/2013 9:26 PM, Ethan Furman wrote: Sounds like the way forward is to specify in the docs how the default Enum __format__ behaves (basically honors width and justification settings to yield the name, anything else passes through to the Enum member

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree splitting this makes sense, so as to not delay the %-formatting fix. While similar in principle, the fixes are unrelated. We may as well keep this issue the __format__ part, since it's been most discussed here

[issue18805] ipaddress netmask/hostmask parsing bugs

2013-08-21 Thread Eric V. Smith
Eric V. Smith added the comment: I haven't had time to review this yet, but at least several of these, if true, are definitely bugs that should be backported. 254.192.128.0 as a netmask? Descending octets as the condition? Yikes. -- nosy: +eric.smith stage: - patch review

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-31 Thread Eric V. Smith
Eric V. Smith added the comment: Looks good to me, too. Thanks for considering all of the feedback! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18738

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

2013-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: It would be nice to combine the behaviors that defaultdict and the case-insensitive comparisons. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986

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

2013-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: Just today I was using a defaultdict where the keys are stock symbols. They're case insensitive (at least for this particular application). In this case I just str.upper everything, but it would be a nice feature to case-preserve the keys that I pre-populate

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

2013-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: True enough! I was trying to distinguish keys that I populate with initial values (mostly stock indexes) versus those where I just read values from a user-supplied file. When I populate the index values, I'd like to preserve the case I initially used. When I

[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. I can't think

[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 on python-dev) how do

[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 rep...@bugs.python.org http://bugs.python.org/issue19056

[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 rep...@bugs.python.org http://bugs.python.org/issue19056

[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 rep

[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 trying to solve, so I suggest you

[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 rep...@bugs.python.org http://bugs.python.org/issue19089

[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 work

[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 rep

[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'something'.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 compatible

[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 rep...@bugs.python.org http

[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 tuple is printed, it uses the repr of its constituent parts

[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

[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 the parsing

[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 rep...@bugs.python.org http://bugs.python.org/issue19289 ___ ___ Python-bugs-list mailing

[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 rep...@bugs.python.org http://bugs.python.org/issue19238 ___ ___ Python-bugs-list mailing

[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 rep...@bugs.python.org http://bugs.python.org/issue19238 ___ ___ Python-bugs-list mailing

[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 rep...@bugs.python.org http://bugs.python.org/issue19427

[issue17556] os.path.join() converts None to '' by default

2013-03-27 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with David. This is a programming error, and should result in an exception. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17556

[issue17608] configparser not honouring section but not variable case

2013-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: Can you show us the code that causes the problem? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17608

[issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs

2013-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I was going to blame Barry, but I see he beat me to it :) It looks like an oversight, and it shouldn't be abstract. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17566

[issue17612] hooks/mail.py requires [smtp] host to be set, despite a comment to the contrary

2013-04-01 Thread Eric V. Smith
New submission from Eric V. Smith: In the mail hook, there's a comment that says: ''' To set the SMTP server to something other than localhost, add a [smtp] section to your hgrc: [smtp] host = mail.python.org port = 25 ''' This is not true. The default host is '', which tells smtplib.SMTP

[issue10379] locale.format() input regression

2013-04-02 Thread Eric V. Smith
Eric V. Smith added the comment: Barry meant that the upstream program that triggered this error has been changed to call format_string() instead of format(). The bug still exists in format(). My suggestion is to have format() be an alias for format_string(). Deprecating format

[issue10379] locale.format() input regression

2013-04-02 Thread Eric V. Smith
Eric V. Smith added the comment: So I guess the question is: would this be a bug fix and applied to 2.7 and 3.3, or just an enhancement for 3.4? I think it would be a bug fix and thus should be backported. It's not like we'd be breaking any working code, unless it was expecting the exception

[issue17621] Create a lazy import loader mixin

2013-04-02 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17621 ___ ___ Python-bugs-list

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

2013-04-03 Thread Eric V. Smith
Eric V. Smith added the comment: My only suggestion would be that the datetime example would be better if it actually used a time portion, similar to the strftime example above it. Otherwise, it looks good. -- ___ Python tracker rep

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

2013-04-03 Thread Eric V. Smith
Eric V. Smith added the comment: That looks great. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8913 ___ ___ Python-bugs-list mailing

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17630 ___ ___ Python-bugs-list

[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-04 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17633 ___ ___ Python-bugs-list

[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-04 Thread Eric V. Smith
Eric V. Smith added the comment: Could you construct a test (that would fail without your patch)? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17633

[issue17705] Fill Character cannot be \0

2013-04-12 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17705 ___ ___ Python-bugs-list

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17705 ___ ___ Python-bugs

[issue17728] format() default precisions undocumented

2013-04-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17728

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric V. Smith
Eric V. Smith added the comment: Indeed, this should be on python-ideas. Eric: can you start a thread over there? Thanks. -- nosy: +eric.smith resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: I agree it should work the same as Enum, and I agree it should be possible to supply the module name. But wouldn't it be cleaner as: Point = namedtuple('Point', 'x y z', module=__name__) rather than: Point = namedtuple(__name__ + '.Point', 'x y z

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17959 ___ ___ Python-bugs-list

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

2013-05-12 Thread Eric V. Smith
Eric V. Smith added the comment: But int has its own __format__ method, so this does not apply. Per the title of this issue, this only refers to object.__format__. For example: This works now, and will continue working: format(2, '1') '2' This is currently an error, and will remain an error

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

2013-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: I say close it. Any shell detection is likely to be fragile, and any changes are likely to break something. It's not worth the risk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6208

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we should not say that %-formatting will be removed from the language. Not until Python 5000, anyway. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031

[issue18058] Define is_package for NamespaceLoader

2013-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's just an oversight. -- assignee: barry - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18058

[issue18056] Document importlib._bootstrap.NamespaceLoader

2013-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: No reason I can think of, other than it never occurred to me to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18056

[issue18070] change importlib.util.module_for_loader to unconditionally set attributes

2013-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think anyone would (or should!) write code that cares, so I think your proposed change is a good one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18070

[issue3451] Asymptotically faster divmod and str(long)

2013-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue18107, in particular http://mail.python.org/pipermail/pypy-dev/2013-May/011433.html. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3451

[issue18127] Strange behaviour with default list argument

2013-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: It's by design. Search for mutable default arguments, for example http://docs.python-guide.org/en/latest/writing/gotchas.html#mutable-default-arguments -- nosy: +eric.smith resolution: - invalid stage: - committed/rejected status: open - closed

[issue18312] make distclean deletes files under .hg directory

2013-06-26 Thread Eric V. Smith
New submission from Eric V. Smith: See: http://mail.python.org/pipermail/python-dev/2013-June/127068.html The find command: find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ -o -name '[@,#]*' -o -name '*.old' \ -o -name '*.orig' -o

[issue18312] make distclean deletes files under .hg directory

2013-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: My plan is to just fix this issue, right now, by changing the find command to be: find $(srcdir)/[a-zA-Z]* ... That fixes this bug and keeps the current functionality. If someone wants to open another issue about changing what distclean does, I think

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you're saying. Given the function definition, the way you're calling it is incorrect, and the error messages explain why. Are you saying that these ways to call repeatfunc() are documented somewhere that needs fixing? I couldn't find

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-06-27 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18313 ___ ___ Python-bugs

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: I see. You can't call repeatfunc() and specify times with a named argument because of *args. Interesting. I'll let Raymond weigh in. -- status: pending - open ___ Python tracker rep...@bugs.python.org http

[issue18340] float related test has problem with Denormal Flush to Zero compiler options

2013-07-01 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18340 ___ ___ Python-bugs-list

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Could you provide an entire example, showing the class num and how you assign __div__? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474

[issue15806] Add context manager for the try: ... except: pass pattern

2012-08-29 Thread Eric V. Smith
Eric V. Smith added the comment: While the classmethod version has some appeal, it doesn't extend well to handling multiple exception types. I'm -0 on this, in any event. I think the original code is more clear. Why force people to learn (or recognize) a second idiom for something so simple

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Bryan. Further, if the string is being interpreted as Tcl, then this strikes me as a possible injection attack vector (although I'll admit to not having looked at the code to see how the Tcl code is being used and/or interpreted). -- nosy

[issue15276] unicode format does not really work in Python 2.x

2012-09-16 Thread Eric V. Smith
Eric V. Smith added the comment: The case with 1.__format__ is confusing the parser. It sees: floating point number 1. __format__ which is indeed a syntax error. Try: 1 .__format__(u'n') '1' or: (1).__format__(u'n') '1

[issue15952] format(value) and value.__format__() behave differently with unicode format

2012-09-17 Thread Eric V. Smith
Eric V. Smith added the comment: I believe the conversion is happening in Objects/abstract.c in PyObject_Format, around line 864, near this comment: /* Convert to unicode, if needed. Required if spec is unicode and result is str */ I think changing the docs will result in more

[issue15039] module/ found before module.py when both are in the CWD

2012-09-18 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15039

[issue3982] support .format for bytes

2012-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: I was just logging in to make this point, but Serhiy beat me to it. When I wrote several years ago that this was easy, it was before the (awesome) PEP 393 work. I suspect, but have not verified, that having a bytes version of this code would now require

[issue3982] support .format for bytes

2012-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: The implementation may be difficult, therefore no one should attempt it? The development cost and maintenance cost is surely part of the evaluation when deciding whether to implement a feature, no? -- ___ Python

[issue16131] Pylauncher is being installed in Windows system folder

2012-10-04 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16131 ___ ___ Python-bugs-list

[issue16134] Add support for RTMP schemes to urlparse

2012-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: As this is a feature request, it can only be applied to 3.4. I've modified the versions. -- components: +Library (Lib) nosy: +eric.smith versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5

[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 have

[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 rep...@bugs.python.org http://bugs.python.org/issue16489

[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 rep...@bugs.python.org

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-04 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___ Python-bugs-list

[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 same conventions. I'd be happy to change

[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 ___ Python tracker rep

[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 rep...@bugs.python.org http://bugs.python.org/issue19528

[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 rep...@bugs.python.org http://bugs.python.org

[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 e...@trueblade.com: -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19528

[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 rep...@bugs.python.org http://bugs.python.org/issue19528

[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 rep...@bugs.python.org http

<    1   2   3   4   5   6   7   8   9   10   >