|
by: Zunbeltz Izaola |
last post by:
Hi to all!
I wonder if it possible (i'm sure python can do :-) ) to define classes on
runtime. My problem (schematically) is the folowwin.
The User can choise betwenn 3 property of an object....
|
by: Chris |
last post by:
Is there any way to make the class Z behave the same way as class Y?
Chris
class Y:
value = 42
def __hasattr__(self, name):
if name == '__int__':
return True
def __getattr__(self, name):
|
by: Jean-François Doyon |
last post by:
Hello,
I'm using MetaClasses to create classes.
How do I make these new classes "globally" available?
I probably just have to assign them to something magic, but I can't seem to
figure out...
|
by: David MacQuigg |
last post by:
I have what looks like a bug trying to generate new style classes with
a factory function.
class Animal(object): pass
class Mammal(Animal): pass
def newAnimal(bases=(Animal,), dict={}):...
|
by: yyy |
last post by:
my question is rather theoretical than practical in the pure programming
aspect...
is "name mangling" the same as "name decorating" ?
browsing the web, you might find multiple people saying...
|
|
by: Daniel Nogradi |
last post by:
I used to have the following code to collect all (old style) class
names defined in the current module to a list called reg:
def meta( reg ):
def _meta( name, bases, dictionary ):
reg.append(...
|
by: hardieca |
last post by:
Hi!
I decorate my unfinished classes and methods with a custom TODO
attribute (as in things To Do). Using reflection, I am then able to
parse through my classes and output all TODOs to a list I...
|
by: allendowney |
last post by:
Hi All,
I am working on a revised edition of How To Think Like a Computer
Scientist,
which is going to be called Think Python. It will be published by
Cambridge
University Press, but there...
|
by: 1x7y2z9 |
last post by:
Say, we have a (parent) class P.
It has N child classes C1(P), C2(P) ... CN(P)
Each of the child classes defines (differently) a method func().
I wish to decorate all of the CX.func() in the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
|