Leopold Toetsch wrote:

Klaas-Jan Stol wrote:

Suppose I would want to have my own custom representation of "None".


What should I do to have my child class be a singleton too? (just extending singleton as well?)


None isn't a singleton. But have a look at the Null PMC or better env.pmc.

$ grep singletion classes/*.pmc

mmm, I looked at classes/none.pmc, this is a copy/paste:
===============
#include <assert.h>

static PMC * Py_None;

pmclass None singleton {

===============
Maybe this is wrong?
I'll have a look at the null pmc, thanks!

(the way to create singletons might change though)

thanks for your help,
klaas-jan


leo

klaas-jan


Reply via email to