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


Groups > comp.lang.python > #50478

Casting classes WAS: Documenting builtin methods

Date 2013-07-11 17:23 -0700
Subject Casting classes WAS: Documenting builtin methods
From Mark Janssen <dreamingforward@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4605.1373588592.3114.python-list@python.org> (permalink)

Show all headers | View raw


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 comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web