GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar by fofoni · Pull Request #126584 · python/cpython Conversation
|
|
The name "evaluate_bound" isn't set in stone; it was added during the 3.14 alphas and does not yet have any compatibility constraints. However, I think it should match the Using "upper bound" instead of "bound" in the documentation seems like a good idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Agreed! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There. I also changed the two instances of "bound" as noun to "upper bound", as mentioned in the OP. I still feel that the expressions "bounded" and "upper bound" may appear disconnected. Maybe the similarity of the words is enough to imply that the expressions are talking about the same thing, but maybe it's not clear for a reader not used to typing -- I'm really not sure. (Also, maybe it's just that English is not my native language.) Currently, the first time both expressions appear is in the following snippet. Perhaps adding just this small note would be enough? This syntax can also be used to create bounded and constrained type
variables::
class StrSequence[S: str]: # S is a TypeVar with a `str` upper bound
- ...
+ ... # We also say that S is bounded by str
class StrOrBytesSequence[A: (str, bytes)]: # A is a TypeVar constrained to str or bytes
... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
That seems reasonable to me! Or maybe This syntax can also be used to create bounded and constrained type variables:: - class StrSequence[S: str]: # S is a TypeVar with a `str` upper bound - ... + class StrSequence[S: str]: # S is a TypeVar with a `str` upper bound; + ... # we can say that S is "bounded by `str`" class StrOrBytesSequence[A: (str, bytes)]: # A is a TypeVar constrained to str or bytes ... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think I'm happy with it! Do I need to do anything else? Thank you all for the very fast iteration! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Not from my perspective! I'll wait a little while before merging, though, in case @JelleZijlstra or anybody else has any comments (there was quite a bit of discussion on the issue!) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <[email protected]>
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Oh wow I used GitHub's "accept suggestion" button, and now it created a commit with a different email address. Do I really need to sign the CLA again? Can I force-push changing that to my email address that had already signed the CLA? EDIT: I guess it doesn't hurt to have the CLA signed from multiple addresses. Please tell me if having multiple addresses in the commit list is not desirable for any reason. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm pretty sure that should be fine :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @fofoni for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No worries! We squash-merge so it doesn't really matter. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… in the context of the 'bound' kw argument to TypeVar (pythonGH-126584) (cherry picked from commit 434b297) Co-authored-by: Pedro Fonini <[email protected]>
|
GH-126657 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… in the context of the 'bound' kw argument to TypeVar (pythonGH-126584) (cherry picked from commit 434b297) Co-authored-by: Pedro Fonini <[email protected]>
|
GH-126658 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…d in the context of the 'bound' kw argument to TypeVar (GH-126584) (#126657) (cherry picked from commit 434b297) Co-authored-by: Pedro Fonini <[email protected]>
…d in the context of the 'bound' kw argument to TypeVar (GH-126584) (#126658) (cherry picked from commit 434b297) Co-authored-by: Pedro Fonini <[email protected]>
… in the context of the 'bound' kw argument to TypeVar (python#126584)
… in the context of the 'bound' kw argument to TypeVar (python#126584)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.