PEP 285: Adding a bool type
Andreas Kostyrka
andreas at mtg.co.at
Wed Apr 10 17:05:35 EDT 2002
On Wed, 03 Apr 2002 06:27:58 GMT
Alex Martelli <aleax at aleax.it> wrote:
> of no use cases for it and is thinking about taking it away again (maybe
> some Smalltalkers will put together an impressive array of practical
> use cases... let's hope...!). It works similarly:
>
Ok, some very useful case, actually I've done this in pre-2.0 Python with some
kludges and some magic :)
class MagicDataBaseTable:
...
def newRow(klass,**params):
...
newRow=classmethod(newRow)
...
class MyTable(MagicDataBaseTable):
...
Now the newRow class method knows that it is being called upon MyTable and can be parametrized by
the table and column names of that table.
Andreas
More information about the Python-list
mailing list