Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50478 > unrolled thread

Casting classes WAS: Documenting builtin methods

Started byMark Janssen <dreamingforward@gmail.com>
First post2013-07-11 17:23 -0700
Last post2013-07-11 17:23 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Casting classes WAS: Documenting builtin methods Mark Janssen <dreamingforward@gmail.com> - 2013-07-11 17:23 -0700

#50478 — Casting classes WAS: Documenting builtin methods

FromMark Janssen <dreamingforward@gmail.com>
Date2013-07-11 17:23 -0700
SubjectCasting 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web