Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50478 > unrolled thread
| Started by | Mark Janssen <dreamingforward@gmail.com> |
|---|---|
| First post | 2013-07-11 17:23 -0700 |
| Last post | 2013-07-11 17:23 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Casting classes WAS: Documenting builtin methods Mark Janssen <dreamingforward@gmail.com> - 2013-07-11 17:23 -0700
| From | Mark Janssen <dreamingforward@gmail.com> |
|---|---|
| Date | 2013-07-11 17:23 -0700 |
| Subject | Casting classes WAS: Documenting builtin methods |
| Message-ID | <mailman.4605.1373588592.3114.python-list@python.org> |
A user was wondering why they can't change a docstring in a module's class.
This made me think: why not have a casting operator ("reciprocal"?) to
transform a bonafide class into a mere carcass of a class which can
then modified and reanimated back into its own type with the type
function? Such that "type(reciprocal(myClass))==myClass"...
reciprocal(myClass) returns a writeable, nonproxy class.__dict__
(perhaps also a list of its bases and name)
Just a thought to consider...
MarkJ
Tacoma, Washington
Back to top | Article view | comp.lang.python
csiph-web