-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-35911: add cell constructor #11771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-35911: add cell constructor #11771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, looks like a no-brainer to me.
Will wait a bit for other core devs. Feel free to ping in a few days if no other feedback comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. May be worth updating https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy to cross-link the new type when it mentions cell_contents.
Thanks @pierreglaser ! |
bpo-35911: Add a
cell
constructorThis PR adds:
cell.__new__
method, with an optionalcontents
arguments.cell
type in theLib/types.py
module, under the nameCellType
Additional docs and tests are also provided.
The rationale behind this PR is explained in detail in the corresponding bpo issue.
https://bugs.python.org/issue35911