[issue43695] Improve `=` in f-strings

2021-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. I agree with Serhiy that it's pushing f-strings too far. If you really want to pursue this, you'll need to specify the semantics much more clearly, and then bring it up on the python-ideas mailing list. But I don't want to give you

[issue43697] Importlib documentation does not cover how meta path finders should handle namespace packages

2021-04-01 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43697> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43695] Improve `=` in f-strings

2021-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see how this would be possible in general. What would you do with a function call that has side effects? f'{a()+b+c=}' ? You'd end up calling a() twice, or inventing your own expression evaluator. -- nosy: +eric.smith

[issue43678] TypeError: get() got an unexpected keyword argument 'vars'

2021-03-31 Thread Eric V. Smith
New submission from Eric V. Smith : Please provide example code that we can run which demonstrates the problem. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's PyMethod_Type. -- nosy: +eric.smith, rhettinger ___ Python tracker <https://bugs.python.org/issue43677> ___ ___

[issue43675] test

2021-03-30 Thread Eric V. Smith
Change by Eric V. Smith : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43675> ___ ___ Python-bugs-list

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond. We can't make a change that would modify existing program output. Which is unfortunate, but such is life. And I'd prefer to see groupings of 5 on the right, but I realize I might be in the minority

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 9a8e0780247acb256dd8b04c15b3dd0f59ef2fe1 by Miss Islington (bot) in branch '3.9': bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (GH-25053) (GH-25055) https://github.com/python/cpython/commit

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset fb1d01b9630b5069fe975f16e07a027d90b89434 by Irit Katriel in branch 'master': bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053) https://github.com/python/cpython/commit

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: > The syntax is related to that of formatted string literals, but it is less > sophisticated and, in particular, does not support arbitrary expressions. That seems fine to me. -- ___ Python tracker

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: If we do anything for float, we should do the same for decimal.Decimal. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43624> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: Same advice as issue 43616: please provide an example we can run. This most likely a problem with how you're using lxml, and not a bug in python. But since we can't test it, we can't know for sure. -- nosy: +eric.smith

[issue41064] Specialise syntax error of **dict in f-string field

2021-03-23 Thread Eric V. Smith
Eric V. Smith added the comment: The parens are added in fstring_compile_expr at https://github.com/python/cpython/blob/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4/Parser/string_parser.c#L391 I don't recall if this is really only a "skip leading whitespace" problem, or if there's

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +easy -patch stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -23731 ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -23730 ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Are you using a 64-bit version of python? What is sys.maxsize? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-19 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3/library/dataclasses.html#post-init-processing should mention that if you need to call super().__init__, you should do it in __post_init__. Dataclasses cannot know what parameters to pass to the super class's __init__, so you'll

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'd add a note to the docs about it, then open a feature request to change the behavior. You could turn this issue into a documentation fix. Unfortunately I don't know if there's a core dev who pays attention to the XML parsers. But I can probably find out

[issue43535] Make str.join auto-convert inputs to strings.

2021-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'm +0.5. Every time this bites me, I apply the same solution, so you're probably right that str.join should just do the work itself. And it's no doubt more performant that way, anyway. And I've probably got some code that's just waiting for the current

[issue43532] Add keyword-only fields to dataclasses

2021-03-17 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +23671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24909 ___ Python tracker <https://bugs.python.org/issu

[issue33129] Add kwarg-only option to dataclass

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Closing this in favor of issue 43532, which has a slightly elaborated approach. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add keyword-only fields to

[issue43532] Add keyword-only fields to dataclasses

2021-03-17 Thread Eric V. Smith
New submission from Eric V. Smith : The idea is that a keyword-only field becomes a keyword-only argument to __init__(). For the proposal and a discussion, see https://mail.python.org/archives/list/python-id...@python.org/message/FI6KS4O67XDEIDYOFWCXMDLDOSCNSEYG/ The @dataclass decorator

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I think that's good text, once the enhancement is made. But for existing versions of python, shouldn't we just document that the text might come back in chunks? I don't have a feel for what the limit should

[issue43471] Fails to import bz2 on Ubuntu

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. @xmm: If you can provide more information showing that this is a bug in Python or its build process, please re-open this issue. -- resolution: -> not a bug stage: -> resolved status: open -&g

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, that's very helpful. Does this only affect content text? This should definitely be documented. As far as changing it, I think the best thing to do is say that if the context text is less than some size (I don't know, maybe 1MB?) that it's guaranteed

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Could you give an example (using a list of callbacks and values or something) that shows how it's behaving that you think is problematic? That's the part I'm not understanding. This doesn't have to be a real example, just show what the user is getting that's

[issue43516] python on raspberry pi

2021-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: You’ve not told us the behavior you see or the behavior you expect, so we can’t tell if this is a bug in python. But it’s in all likelihood not a bug. If you want to get help with your code, I suggest asking on the python-list mailing list or maybe

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think we could document where a "quoted string of length 8 characters would be returned in multiple pieces" occurs. Which API is that? If we change that, and if we call it an enhancement instead of a bug fix, then it can't be backported. It woul

[issue43080] pprint for dataclass instances

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: I'm leaning toward accepting this on the condition that it only be invoked for dataclasses where __repr__ was the version generated by @dataclass. And also that it use the same fields that the generated __repr__ would use (basically skipping repr=False

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: Perhaps you could open a documentation bug? I think specific examples of where the documentation is wrong, and how it could be improved, would be helpful. Thanks! -- nosy: +eric.smith ___ Python tracker <ht

[issue43477] from x import * behavior inconsistent between module types.

2021-03-13 Thread Eric V. Smith
Eric V. Smith added the comment: "git blame" will help you identify the authors. It looks there are 5 people involved: Brett, Antoine, Nick, Eric Snow, and Dino. -- ___ Python tracker <https://bugs.python.o

[issue43477] from x import * behavior inconsistent between module types.

2021-03-12 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +brett.cannon, eric.smith ___ Python tracker <https://bugs.python.org/issue43477> ___ ___ Python-bugs-list mailing list Unsub

[issue43471] Fails to import bz2 on Ubuntu

2021-03-11 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue43471> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43471] Fails to import bz2 on Ubuntu

2021-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: You're probably missing needed dependencies. For example, see https://stackoverflow.com/questions/12806122/missing-python-bz2-module If you look at the output of make, you should be able to see that _bz2 wasn't built. -- nosy: +eric.smith

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-03-10 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43463> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43435] Py_BuildValue("y#".... returns incomplete result

2021-03-09 Thread Eric V. Smith
Eric V. Smith added the comment: David: If you could give us an example showing the inputs, the actual outputs, and how they differ from what you expect, that would be helpful. Otherwise it's a lot of guessing on our part. -- nosy: +eric.smith

[issue43415] Typo in dataclasses documentation

2021-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43415] Typo in dataclasses documentation

2021-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 6d4273356764a3837c914b2aced7a668c534e0be by Miss Islington (bot) in branch '3.8': bpo-43415: Fix typo on dataclasses.rst (GH-24789) (GH-24791) https://github.com/python/cpython/commit/6d4273356764a3837c914b2aced7a668c534e0be

[issue43415] Typo in dataclasses documentation

2021-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset fb3b0310305acdfad7c26705c2ee9a8712a43cf4 by Miss Islington (bot) in branch '3.9': bpo-43415: Fix typo on dataclasses.rst (GH-24789) (GH-24790) https://github.com/python/cpython/commit/fb3b0310305acdfad7c26705c2ee9a8712a43cf4

[issue43415] Typo in dataclasses documentation

2021-03-08 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: docs@python -> eric.smith title: Typo -> Typo in dataclasses documentation ___ Python tracker <https://bugs.python.org/i

[issue43415] Typo

2021-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 0554044ddccdb7bf1fa4a8bc880e7a7b59f6479c by Guilherme Martins Crocetti in branch 'master': bpo-43415: Fix typo on dataclasses.rst (#24789) https://github.com/python/cpython/commit/0554044ddccdb7bf1fa4a8bc880e7a7b59f6479c

[issue43415] Typo

2021-03-06 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43415> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43355] __future__.annotations breaks inspect.signature()

2021-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is all about: should inspect.signature() resolve string annotations into actual types (via get_type_hints, or whatever)? I don't use expect much, so I can't offer an opinion there. -- ___ Python

[issue43380] Assigning function parameter to class attribute by the same name

2021-03-02 Thread Eric V. Smith
Eric V. Smith added the comment: Was def createD(D): supposed to be: def createD(d): ? Not that that changes your problem. I just want to understand the exact issue. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43355] __future__.annotations breaks inspect.signature()

2021-03-02 Thread Eric V. Smith
Eric V. Smith added the comment: Can you show the values of “expected” and “actual” for both the failures and successes? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43342] Error while using Python C API

2021-03-01 Thread Eric V. Smith
Eric V. Smith added the comment: You're going to get more help by posting your question elsewhere. This isn't a forum where we can help you debug your code: it's for reporting bugs in Python. You might try https://discuss.python.org/c/users/, or maybe the python-list mailing list. Good

[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-02-27 Thread Eric V. Smith
Eric V. Smith added the comment: As a rule we don't try and document every exception that can be raised. I could go either way on documenting encoding errors with the json module, although it seems pretty clear that an encoding error would be possible in this case. -- assignee

[issue43326] About Zipfile

2021-02-27 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue43326> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43326] About Zipfile

2021-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's a problem with Python here. The complaint seems to be one or more of: - The creating software allowed a newline to be in the filename. - Windows allows the creation of filenames with newlines. - The Windows UI doesn't handle filenames

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-18 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43257> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43227] Backslashes in function arguments in f-string expressions

2021-02-14 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43227> ___ ___

[issue43227] Backslashes in function arguments in f-string expressions

2021-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, they're prohibited anywhere inside of the braces {}. This might be relaxed in the future, but through 3.9 it's still enforced. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv

2021-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks. I’m guessing the space in the path is causing a problem. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv

2021-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: Where did you install Python from? Before you've activated the virtual env, please run "echo $PATH". After you've activated the virtual env, can you run "ls -l .venv/bin" and "echo $PATH"? --

[issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv

2021-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: Please do not post screen captures. It makes it difficult for users with accessibility software and it makes it hard for people trying to help you to copy and paste exactly what you've tried. I'm unable to duplicate your problem. [~]$ ps PID TTY

[issue43206] Optional parameter got passed even when not in the call

2021-02-12 Thread Eric V. Smith
Eric V. Smith added the comment: It's hard to tell because you didn't show the whole program, but this looks like a mutable default argument problem. Basically you're changing the default value in a different call to Row(). https://docs.python.org/3/faq/programming.html#why-are-default

[issue43191] Shared Memory for array of object

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: If you could demonstrate the problem without numpy, then we could probably help you here. I don't know much about numpy. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: Would you infer it to be ‘?’ or ‘*’? I’m not completely opposed, but I haven’t thought it through or looked at the code. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with @hroncok, and maybe we could tweak the message to say FileNotFoundError: [Errno 2] No such file or directory: while executing './demo'. Maybe bad shebang, or missing file? Or something to that effect. I realize that listing all possible error

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: Providing a default value does not imply setting nargs, so you need to specify both. I think it's not clear what nargs would default to, if you wanted to change the behavior if default= is supplied.. In your example you probably want nargs

[issue43191] Shared Memory for array of object

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like a numpy usage question, not a python bug. I suggest you ask on Stackoverflow or a numpy user forum. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43130] Should this construct throw an exception?

2021-02-04 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43130> ___ ___

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-04 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest making no change here, except maybe documenting it somewhere. Removing the filename would make this problem even harder to diagnose. And adding additional code to an error condition just increases the chance of something failing. The error

[issue43104] csv package in class

2021-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a forum for helping users with questions about Python, it's for reporting bugs in Python. I suggest you ask this question on the python-list mailing list: https://mail.python.org/mailman/listinfo/python-list And when you do ask your question

[issue43099] Deleted positions lists

2021-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: That's the correct behavior. The elements given by the start and end range are replaced by what's on the right hand side of the assignment. They don't need to be the same length. >>> list_test=[0,1,2,3,4,5,6] >>> list_test[2:5

[issue43086] Excess data in not handled properly in binascii.a2b_base64()

2021-01-31 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43080] pprint for dataclass instances

2021-01-31 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we need a better pprint. I think it would be easier to create something new rather than try and morph the existing pprint, but maybe I lack enough imagination. I'd prefer to use functools.singledispatch instead of a __pprint__ method

[issue43080] pprint for dataclass instances

2021-01-31 Thread Eric V. Smith
Eric V. Smith added the comment: Adding an attribute on the __repr__ (and other methods?) signifying that they were generated would let us distinguish them. Say, checking getattr(__repr__, '__is_generated__', False), or similar. -- ___ Python

[issue43039] tempfile.TemporaryDirectory() name string is incorrect

2021-01-29 Thread Eric V. Smith
Eric V. Smith added the comment: I've been thinking about this some more, and I agree with Terry. Changing str() seems dangerous, and __fspath__ wouldn't be backwardly compatible. If you want the name, use .name. So I'm going to close this. -- resolution: -> rejected st

[issue43055] Inconsistent behaviour when using walrus operator with 'and'/'or'

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. The short circuit evaluation of and/or expressions is already documented, and this behavior follows directly from that. -- resolution: -> not a bug stage: -> resolved status: open -&g

[issue43055] Inconsistent behaviour when using walrus operator with 'and'/'or'

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is pretty clearly the intended semantics. In your first example, what do you propose "print(x)" would produce? Consider: if False and (x:=input()) != '': pass else: print(x) We cannot change the semantics to now call input(), or an

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Mark. I'll just close it now. I've made a reminder about the PEP, but not sure when/if I'll get to it. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracke

[issue43039] tempfile.TemporaryDirectory() name string is incorrect

2021-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Serhiy: changing TemporaryDirectory.__str__() definitely has drawbacks. I assume gitPython is using str() where they might want to use os.fspath(). Maybe tempfile.TemporaryDirectory (and similar) could then support __fspath__. -- nosy

[issue41459] pickle.load raises SystemError on malformed input

2021-01-26 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue41459> ___ ___

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: Good point on surveying other languages for a PEP. You're further along in your thinking than I am! -- ___ Python tracker <https://bugs.python.org/issue43

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it really matters what other languages do. We're not designing this from scratch. We need to reflect that state we're in, which is many, many lines of working code using 'j'. I see the two options as: support 'i' and 'j', or break existing code

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: As I said in msg385648, I don't think it's feasible. Maybe I'll write a PEP just to get it rejected so we can point to it when this discussion comes up, which it does a few times a year. -- ___ Python tracker

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: Even if we wanted to switch to "i" we'd have to continue to also support "j": there's a ton of existing code that uses it. Since "j" is used by some fields (including my own) for the imaginary part of complex numbers, and since

[issue42914] pprint numbers with underscore

2021-01-13 Thread Eric V. Smith
Eric V. Smith added the comment: +1 also. I agree with Raymond it should be optional. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42

[issue42881] Should typing.get_type_hints change None annotations?

2021-01-10 Thread Eric V. Smith
Eric V. Smith added the comment: See also https://github.com/python/mypy/issues/640 "Support type(None) as a type", which was closed with "I don't think anyone cares". Jukka's comment was "Or maybe we should update PEP 484 to not suggest that type(None) is v

[issue42881] Should typing.get_type_hints change None annotations?

2021-01-10 Thread Eric V. Smith
Eric V. Smith added the comment: Notice that this isn't just for __init__ or return types, it happens with any annotations (here, with 3.8): >>> def g(i: None): pass ... >>> g.__annotations__ {'i': None} >>> get_type_hints(g) {'i': } >>> I just no

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think zero padding makes sense. For example: >>> td = datetime.timedelta(hours=100) >>> str(td) '4 days, 4:00:00' I think '4 days, 04:00:00' would not be very user friendly. In any event, backward compatibility would preven

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, my message collided with rhettinger. -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue42788> ___ ___

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: Regular division (/) yields a float, so 1 / 1 is 1.0. https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations says that for floor division, the arguments are first converted to a common type, which here would be float. So, your

[issue42776] The string find method shows the problem

2020-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: 'abcddd'.find('a', start=0) would appear to be allowed from the help text, but it isn't legal. This is because .find() does not allow keyword arguments. It looks like find could be documented as find(self, sub, start=None, end=None, /) Although it doesn't

[issue42765] Introduce new data model method __iter_items__

2020-12-28 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42765> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42774] 'ipaddress' module, bad result for 'is_private' on "192.0.0.0"

2020-12-28 Thread Eric V. Smith
Eric V. Smith added the comment: The ipaddress documentation references https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml, which says that 192.0.0.0/29 is reserved and not globally reachable. I think in that sense, it's a private address

[issue42753] "./configure" linux chrome beta

2020-12-28 Thread Eric V. Smith
Eric V. Smith added the comment: This appears to not be a bug with Python, so I'm going to close this. If you're having additional build problems, I suggest you ask for help on the python-list mailing list, or maybe on Stack Overflow. -- resolution: -> not a bug stage: -> re

[issue42758] pathlib.Path to support the "in" operator (x in y)

2020-12-28 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's any chance we'd add "in" as an alias for "is_relative_to()", so I'm going to close this. If you disagree, you could try and get support on python-ideas, and then we can re-open this. Thanks! -- resolution

[issue42758] pathlib.Path to support the "in" operator (x in y)

2020-12-27 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: -Python 3.9 ___ Python tracker <https://bugs.python.org/issue42758> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42758] pathlib.Path to support the "in" operator (x in y)

2020-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: Can you describe what this would do? How is it different from path.is_relative_to(other_path)? >>> import pathlib >>> pathlib.Path('/home/Torxed/machine.qcow2').is_relative_to(pathlib.Path('/home/Torxed')) True --

[issue42753] "./configure" linux chrome beta

2020-12-27 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Build -Installation ___ Python tracker <https://bugs.python.org/issue42753> ___ ___ Python-bugs-list mailing list Unsub

[issue42753] "./configure" linux chrome beta

2020-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have a C compiler installed? It's mentioned here https://devguide.python.org/setup/#unixhttps://devguide.python.org/setup/#unix I found a number of guides for building Python on Chromebooks via searching. I don't have any experience, so I'm not going

[issue42724] Change library name when building.

2020-12-27 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42724> ___ ___

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: I'm just warning you that I probably won't accept it. I haven't heard of any demand for this feature. You might want to bring it up on python-ideas if you want to generate support for the proposal. -- ___ Python

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think this belongs in dataclasses itself, at least not until it's been vetted widely. You might want to put it on PyPI first as a standalone project. -- ___ Python tracker <https://bugs.python.

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: Something like that. You'd have to write some tests and try it out. -- ___ Python tracker <https://bugs.python.org/issue42

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