[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Pablo! -- ___ Python tracker <https://bugs.python.org/issue44655> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: It's obviously not super important, but it would be nicer if the version with the suggestion were more like the version without the suggestion. Specifically, mentioning the object type: >>> class E: ... __slots__=('a') ... >>> E()

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Also, the dot after the first 'b' was confusing to me: I thought it had something to do with an attribute of b. And the quotes around the second 'b' were also confusing, but that's mostly because the original example initialized a class variable named 'b

[issue44649] dataclasses slots with init=False field raises AttributeException

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I created issue 44655 for the confusing error message. The problem with dataclasses is that the instance variable 'b' needs to be initialized, instead of the current dataclasses behavior where it relies on the class variable when reading 'b

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
New submission from Eric V. Smith : This is related to issue 44649. This is the simplest non-dataclasses case I could come up with. Given: class Example: __slots__ = ('a', 'b') def __init__(self, a): self.a = a obj = Example(42) print(obj.b) I get this in 3.10 and main

[issue44649] dataclasses slots with init=False field raises AttributeException

2021-07-15 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44649> ___ ___ Python-bugs-list mai

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, thank you Leonardo! There are probably places in the stdlib where changing to f-strings would be a performance improvement. Of course finding those places is the challenge! -- nosy: +eric.smith ___ Python

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-07-08 Thread Eric V. Smith
Eric V. Smith added the comment: As the author of PEP 420, I think having test discovery support namespace packages is a mistake, at least in the sense of pretending every directory is a namespace package. -- nosy: +eric.smith ___ Python tracker

[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Eric V. Smith
Eric V. Smith added the comment: > As a side note, I think making the install restrictive is more work than just let it install where user wants to install. The restrictions need to be coded - don't they? :) Well at this point, the restrictions already exist! So change it

[issue44577] Probably defect in Python 3.7.11

2021-07-07 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a short code example that reproduces this, preferably without using any third party libraries? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44551] Substraction: unprecise result

2021-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: This is not a bug, but expected floating point behavior. See https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this should be closed (and I'm closing it). I don't see any reason why this function should do something other than raise TypeError if given bs=None. If you want that behavior, write a small wrapper function. The "if not bs" che

[issue44529] Using typing.Union in isinstance checks

2021-06-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44527] On Windows, subprocess.run gets stuck indefinitely

2021-06-28 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +eric.smith, paul.moore, steve.dower, tim.golden, zach.ware title: subprocess.run gets stuck indefinitely -> On Windows, subprocess.run gets stuck indefinitely ___ Python tracker <

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Eric V. Smith
Eric V. Smith added the comment: Clarifying the title. -- nosy: +eric.smith title: exception is thrown if bs = None -> In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None ___ Python tracker <https://bugs.pyth

[issue44475] Dataclass Causes Infinite Recursion when using type of bytes

2021-06-24 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith status: open -> pending ___ Python tracker <https://bugs.python.org/issue44475> ___ ___ Python-bugs-

[issue44452] Allow paths to be joined without worrying about a leading slash

2021-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: You should bring this up on the python-ideas mailing list if you want some discussion. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44496] string.Formatter class not allowing {.field}

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

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2021-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's any action to be done here, so I'm going to close this. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44475] Dataclass Causes Infinite Recursion when using type of bytes

2021-06-21 Thread Eric V. Smith
Eric V. Smith added the comment: Please give a complete example that we can execute. -- ___ Python tracker <https://bugs.python.org/issue44475> ___ ___ Pytho

[issue6871] decimal.py: more format issues

2021-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Irit. I'm closing this as "won't fix". -- resolution: out of date -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue6871] decimal.py: more format issues

2021-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: I tend to agree with Mark: any change would be disruptive, and it doesn't seem to be causing any real problem. Irit: did you come across this because it's causing a problem somewhere? -- ___ Python tracker <ht

[issue44433] processes created by subprocess.Popen is not terminating

2021-06-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you can reproduce it with a smaller program that we can test, please attach the information and re-open this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-17 Thread Eric Snow
Eric Snow added the comment: FWIW, I've wrapped up the key parts that I wanted to get done here (co_localplusnames/kinds, MAKE_CELL, eliminate unused fast local for arg cells). I'm leaving this open for now as there are a few things I didn't do that seem part of the original intention

[issue44443] dataclass looks up field default value on the class, not the class's __dict__

2021-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclass looks up default on the class, not the class's __dict__ -> dataclass looks up field default value on the class, not the class's __dict__ ___ Python tracker <https://bugs.python.org/issu

[issue44443] dataclass looks up default on the class, not the class's __dict__

2021-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue3> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44443] dataclass looks up default on the class, not the class's __dict__

2021-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclass looks up default on the class, not the classes __dict__ -> dataclass looks up default on the class, not the class's __dict__ ___ Python tracker <https://bugs.python.org/issu

[issue44443] dataclass looks up default on the class, not the classes __dict__

2021-06-17 Thread Eric V. Smith
New submission from Eric V. Smith : Consider: class FtpHelper(ftplib.FTP): host: str baz: str = 'baz default' >>> FtpHelper.host '' >>> FtpHelper.baz 'baz default' >>> getattr(FtpHelper, "host") '' >>> getattr(FtpHelper, "baz

[issue44365] Bad dataclass post-init example

2021-06-17 Thread Eric V. Smith
Eric V. Smith added the comment: I was thinking about something like: @dataclass class FtpHelper(ftplib.FTP): my_host: str my_user: str lookup_password: InitVar[Callable] def __post_init__(self, lookup_password): super().__init__(host=self.my_host, user=self.my_user

[issue44433] processes created by subprocess.Popen is not terminating

2021-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: This is probably not a python bug. But if you can demonstrate it without needing to install the Oracle software, we can take a look at it. You've also not explained how you're using multiprocessing. We need an complete, short, working example program

[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix
Change by Eric Phenix : -- keywords: +patch pull_requests: +25336 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26751 ___ Python tracker <https://bugs.python.org/issu

[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix
New submission from Eric Phenix : Suggested functionality: > python -m uuid > b9aa5a06-e2cd-4c26-b26b-1590f01ea996 -- messages: 395906 nosy: ephenix priority: normal severity: normal status: open title: Add command-line functionality to uuid module type: enhancement versions:

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-15 Thread Eric Snow
Eric Snow added the comment: New changeset ac38a9f2dfbba95f5d4338eb11a0221d38ef9328 by Eric Snow in branch 'main': bpo-43693: Eliminate unused "fast locals". (gh-26587) https://github.com/python/cpython/commit/ac38a9f2dfbba95f5d4338eb11a022

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest you close it. If you want some broader discussion, you should bring it up on the python-ideas mailing list, but I don't expect you'll get much support. -- ___ Python tracker <https://bugs.python.

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions: this could only be added to 3.11. I think the ship has sailed on this. The old names could never be removed so we'd have to support both names forever. I think it's not worth the hassle. -- nosy: +eric.smith versions: -Python 3.10

[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: That's the documented behavior: "A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash.&qu

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure directly calling __post_init__ is a good pattern. Why would not calling __init__, like you would with any other class, not be the preferred thing to do? -- ___ Python tracker <https://bugs.python.

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Eric V. Smith
Eric V. Smith added the comment: The example was added in https://github.com/python/cpython/pull/25967 When reviewing it, I think I missed the fact that the base class is a dataclass. The example and text make more sense if Rectangle isn't a dataclass. Still, I don't like the example at all

[issue21760] inspect documentation describes module type inaccurately

2021-06-09 Thread Eric Snow
Eric Snow added the comment: I've merged the changes for __file__. Thanks, furkanonder! The fixes in the types module remain to be done, though now I see 4 of the relevant attributes instead of 2. (missing: __path__, __file__, __cached__

[issue42088] types.SimpleNamespace.__repr__ documentation inconsistency

2021-06-09 Thread Eric Snow
Eric Snow added the comment: > According to the documentation for types.SimpleNamespace, > `repr(SimpleNamespace())` > should return `"SimpleNamespace()"`, but in actuality returns `"namespace()"`. Note that I purposefully wrote "roughly" in the

[issue42088] types.SimpleNamespace.__repr__ documentation inconsistency

2021-06-09 Thread Eric Snow
Eric Snow added the comment: I'm not sure what to think about this. The type is explicitly exposed to Python code "SimpleNamespace" via the types module. However, that's the same as how other builtin types are exposed in that module. For example, the builtin `P

[issue44363] Address sanitizer (gcc version) is generating false positives

2021-06-09 Thread Eric Snow
Eric Snow added the comment: This was my bad. I only partially fixed original problem when un-reverting 3fa63e in gh-26609. I've merged the rest of the fix in gh-26626. Sorry about that. -- nosy: +eric.snow ___ Python tracker <ht

[issue44365] Bad dataclass post-init example

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed that that's not a good (or even workable) example. Thanks for pointing it out. I'll come up with something better. -- assignee: docs@python -> eric.smith versions: +Python 3.10, Python 3.11, Python

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-09 Thread Eric Snow
Eric Snow added the comment: New changeset e6e34e45222b9c7a63ba92386612acf768082ba0 by Eric Snow in branch 'main': bpo-43693: Do not check co_cell2arg if a non-cell offset. (gh-26626) https://github.com/python/cpython/commit/e6e34e45222b9c7a63ba92386612acf768082ba0

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-09 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +25212 pull_request: https://github.com/python/cpython/pull/26626 ___ Python tracker <https://bugs.python.org/issue43

[issue44355] Allow spaces in format strings

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: See msg395383 for how it's an incompatible change even to .format(). In the 15 years since I implemented .format(), this is the first I've ever heard of someone being confused by adding extra spaces. I don't think it's worth changing

[issue44355] Allow spaces in format strings

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: The problem with this change is that it wouldn't be backward compatible. I'm not sure how many people it would affect, but probably more than zero. >>> str.format('{ 0 }', **{' 0 ': 42}) '42' >>> str.format('{ }', **{' ': 43}) '43' Does

[issue44355] Allow spaces in format strings

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

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-08 Thread Eric Snow
Eric Snow added the comment: New changeset 3e1c7167d86a2a928cdcb659094aa10bb5550c4c by Eric Snow in branch 'main': bpo-43693: Un-revert commit f3fa63e. (#26609) https://github.com/python/cpython/commit/3e1c7167d86a2a928cdcb659094aa10bb5550c4c

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-08 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +25192 pull_request: https://github.com/python/cpython/pull/26609 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-08 Thread Eric Snow
Eric Snow added the comment: Thanks, Pablo! -- ___ Python tracker <https://bugs.python.org/issue43693> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Eric Snow added the comment: New changeset 165c884154901deae46b5e328a6414d130e6bfff by Eric Snow in branch 'main': bpo-43693: Silence some compiler warnings. (gh-26588) https://github.com/python/cpython/commit/165c884154901deae46b5e328a6414d130e6bfff

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +25173 pull_request: https://github.com/python/cpython/pull/26588 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +25172 pull_request: https://github.com/python/cpython/pull/26587 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Eric Snow added the comment: New changeset 631f9938b1604d4f893417ec339b9e0fa9196fb1 by Eric Snow in branch 'main': bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396) https://github.com/python/cpython/commit/631f9938b1604d4f893417ec339b9e0fa9196fb1

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Eric Snow added the comment: New changeset 2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6 by Eric Snow in branch 'main': bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577) https://github.com/python/cpython/commit/2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +25165 pull_request: https://github.com/python/cpython/pull/26577 ___ Python tracker <https://bugs.python.org/issue43

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: The code you've attached doesn't generate the error you provided. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44226] Threads shutting down in Py 2.7 but not in Py 3.69 while making SSH connection using Paramiko module

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: No, I'm sorry that I don't. The example is too large for me (or probably any of our volunteers) to look through and reason about. I think asking on a forum like Stack Overflow is your best bet, but even there they will ask for a simpler example. Or maybe try

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: If you can't provide any more information, we can't help you and I'll have to close this issue. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Python 3.6 is no longer supported. Please try to reproduce this with python 3.8 or 3.9. Without seeing the code that causes the failure, it's not possible for us to provide any help. Please try to reproduce the code with the smallest possible example

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: > _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None, > init=False) That's an interesting idea. I'll play around with it. I'm not sure "alias" feels quite right, as it only applies to __init__ (if I'm u

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Eric Snow
Eric Snow added the comment: Thanks Pablo. I'll get this sorted out. Sorry for the pain. -- ___ Python tracker <https://bugs.python.org/issue43693> ___ ___

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-03 Thread Eric Snow
Eric Snow added the comment: New changeset b2bf2bc1ece673d387341e06c8d3c2bc6e259747 by Mark Shannon in branch 'main': bpo-43693: Compute deref offsets in compiler (gh-25152) https://github.com/python/cpython/commit/b2bf2bc1ece673d387341e06c8d3c2bc6e259747

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-03 Thread Eric Snow
Eric Snow added the comment: New changeset 2c1e2583fdc4db6b43d163239ea42b0e8394171f by Eric Snow in branch 'main': bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388) https://github.com/python/cpython/commit

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure the original version needs improving. This sounds like a problem understanding how warnings work. Do you really want to say that for warnings, they're sometimes handled by the warning machinery and therefore don't get passed along to the calling

[issue44265] Create an MSI Package

2021-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: See https://bugs.python.org/issue25124 for a discussion on why MSI won't be supported going forward. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-27 Thread Eric Snow
Eric Snow added the comment: New changeset 9f494d492944c3a6a7a7471b4ad3a025dc7de289 by Eric Snow in branch 'main': bpo-43693: Add _PyCode_New(). (gh-26375) https://github.com/python/cpython/commit/9f494d492944c3a6a7a7471b4ad3a025dc7de289

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-26 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24989 pull_request: https://github.com/python/cpython/pull/26396 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-26 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24981 pull_request: https://github.com/python/cpython/pull/26388 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-25 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24967 pull_request: https://github.com/python/cpython/pull/26375 ___ Python tracker <https://bugs.python.org/issue43

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-25 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24955 pull_request: https://github.com/python/cpython/pull/26364 ___ Python tracker <https://bugs.python.org/issue43

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-25 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: I've never seen this behavior anywhere. In general, I think being looser with allowed inputs is not a good idea. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44226] Threads shutting down in Py 2.7 but not in Py 3.69 while making SSH connection using Paramiko module

2021-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: This was reported a few hours ago at https://github.com/paramiko/paramiko/issues/1856. I'm closing this as a third party issue. -- nosy: +eric.smith resolution: -> third party stage: -> resolved status: open -&g

[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: > It is a pretty-targeted optimization, so I don't expect it to speed up the > macro benchmarks. Though that shouldn't be a blocker for small, targeted > optimizations. In the past we've rejected optimizations that make the code more complex a

[issue44199] code example index error in tutorial controlflow

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: The example is correct. The result is sorted by the second item (index=1) of each tuple: four one three two Maybe the text could make it more clear that that's the desired output. -- nosy: +eric.smith ___ Python

[issue44194] Folding ''.join() into f-strings

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: To be pedantic, f-strings don't "cast" to a string, they call format(obj) on the argument. Typically this is the same as str(obj), but it need not be. I guess if all of the arguments are already exact strings then this distinction doesn't matte

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: No, iteration is explicitly a non-goal of PEP 557. See the section on namedtuple for why: https://www.python.org/dev/peps/pep-0557/#why-not-just-use-namedtuple -- ___ Python tracker <https://bugs.python.

[issue44177] Unable to get the else while parsing through AST module

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: There's no actual code associated with the "else" line, so there's no way to get the line number. dis.dis(sample_data) might give you some insight. Since this all works as designed, I'm going to close this issue. You might get more help on Sta

[issue44146] Format string fill not handling brace char

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: Since this is working as designed, I'm going to close it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-19 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24865 pull_request: https://github.com/python/cpython/pull/26258 ___ Python tracker <https://bugs.python.org/issue43

[issue44177] Unable to get the else while parsing through AST module

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: It's in the AST. >>> tree.body[0].orelse[0].orelse[0].lineno 7 To see it with dump, use: ast.dump(tree, include_attributes=True) Which, after some reformatting, gives: Module(body=[If(test=Compare(left=Name(id='num', ctx=Load(), lineno=2, col

[issue44177] Unable to get the else while parsing through AST module

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: Formatting the result, I get: Module(body=[If(test=Compare(left=Name(id='num', ctx=Load()), ops=[Gt()], comparators=[Constant(value=0, kind=None)]), body=[Expr(value=Call(func=Name(id

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-18 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow nosy_count: 4.0 -> 5.0 pull_requests: +24833 pull_request: https://github.com/python/cpython/pull/26216 ___ Python tracker <https://bugs.python.org/issu

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

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

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

2021-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: Please report this to the Cython bug tracker: https://github.com/cython/cython/issues/ When you do that, you'll want to show the actual code you're having a problem with. You're using both "//" and "/" here. As Pablo said, you're probab

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

2021-05-18 Thread Eric V. Smith
New submission from Eric V. Smith : If this is really a Cython issue, you should report it on the Cython bug tracker. This bug tracker is for CPython. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44160] speed up searching for keywords by using a dictionary

2021-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: Maybe the XXX comment in ceval.c should be removed? If we wouldn't change the code to use a dictionary, then that comment seems incorrect. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.

[issue44109] missing dataclass decorator in match-statement example

2021-05-17 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: a more useful example would use dataclasses or typing.NamedTuple. The use of class variables is unusual, and it took me a while to understand how it would work. -- nosy: +eric.smith

[issue44146] Format string fill not handling brace char

2021-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: In the future, if you get an error, please tell us what the error is. It makes responding to bugs easier. '{::>10d'.format(5) Gives me an error with 3.10: >>> '{::>10d'.format(5) Traceback (most recent call last): File "", line 1,

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "If it ran in 1.98 secs then the new patch would theoretically measure 1.96 (original - 0.22)" That difference is 0.02 seconds, or about 1%, correct? I'm just trying to understand what we're meas

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "there's an increase in speed by 0.22 or something like that" 0.22 what? Seconds? Percent? A factor of 0.22? What are you measuring, and how are you measuring it? -- nosy: +eric.smith ___ Python track

[issue44124] Unhelpful error messages with mis-ordering of f-string specifiers

2021-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: As you note, some of these likely cannot be improved. There was talk last year about moving f-string's bespoke lexer/parser/compiler into the normal Python grammar. But I'm not sure if that ever got anywhere. If we did make that change, it would be easier

[issue44123] make function parameter sentinel value true singletons

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

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-05-12 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue43176> ___ ___ Python-bugs-list mailing list Unsubscrib

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

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

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

2021-05-10 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset f47305aa1fa41c38f744e9a16ae33b74c6fd45e7 by Miss Islington (bot) in branch '3.10': bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26018) https://github.com/python/cpython/commit

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

2021-05-10 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 4d532d3f8f7970493442d7c217220f60312f92e1 by Miss Islington (bot) in branch '3.9': bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26019) https://github.com/python/cpython/commit

[issue44083] problem with updated 3.9.5

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

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: Also: How are you executing this code? From IDLE? From the command line? -- status: pending -> open ___ Python tracker <https://bugs.python.org/issu

<    4   5   6   7   8   9   10   11   12   13   >