At Thursday 4/1/2007 23:52, jeremito wrote:
I am writing a class that is intended to be subclassed. What is the
proper way to indicate that a sub class must override a method?
If any subclass *must* override a method, raise NotImplementedError
in the base class (apart from documenting how yo
Gabriel Genellina schrieb:
> At Thursday 4/1/2007 23:52, jeremito wrote:
>
>> I am writing a class that is intended to be subclassed. What is the
>> proper way to indicate that a sub class must override a method?
>
> If any subclass *must* override a method, raise NotImplementedError in
> the ba
Gabriel Genellina wrote:
> At Thursday 4/1/2007 23:52, jeremito wrote:
>
> >I am writing a class that is intended to be subclassed. What is the
> >proper way to indicate that a sub class must override a method?
>
> If any subclass *must* override a method, raise NotImplementedError
> in the base
On 2007-01-05, Thomas Ploch <[EMAIL PROTECTED]> wrote:
>>> I am writing a class that is intended to be subclassed. What
>>> is the proper way to indicate that a sub class must override a
>>> method?
>>
>> If any subclass *must* override a method, raise
>> NotImplementedError in the base class (a
Grant Edwards schrieb:
> On 2007-01-05, Thomas Ploch <[EMAIL PROTECTED]> wrote:
>
I am writing a class that is intended to be subclassed. What
is the proper way to indicate that a sub class must override a
method?
>>> If any subclass *must* override a method, raise
>>> NotImplement
jeremito wrote:
> I am writing a class that is intended to be subclassed. What is the
> proper way to indicate that a sub class must override a method?
You can't (easily).
If your subclass doesn't override a method, then you'll get a big fat
AttributeError when someone tries to call it. But thi
On 2007-01-05, Thomas Ploch <[EMAIL PROTECTED]> wrote:
>>> I learn so much from this list. I didn't even know this error
>>> existed.
>>
>> And remember: even if it didn't, you could have created your
>> own:
>
> Erm, it wasn't me who asked. I just wanted to say that I didn't know
> that there is
On Jan 4, 2007, at 7:56 PM, Thomas Ploch wrote:
> Gabriel Genellina schrieb:
>> At Thursday 4/1/2007 23:52, jeremito wrote:
>>
>>> I am writing a class that is intended to be subclassed. What is the
>>> proper way to indicate that a sub class must override a method?
>>
>> If any subclass *must*
On Jan 4, 2007, at 9:28 PM, Carl Banks wrote:
> jeremito wrote:
>> I am writing a class that is intended to be subclassed. What is the
>> proper way to indicate that a sub class must override a method?
>
> You can't (easily).
>
> If your subclass doesn't override a method, then you'll get a big
I downloaded MySQL-python-1.2.1 from SourceForge and installed it on a
Mandrake system (Mandrake Linux 9.2 3.3.1-2mdk on linux2).
The installation was successful. The gcc version is 3.3.
My Python version is 2.4.2. When I import MySQLdb, I get an error
which says that __pure_virtual is an undef
On Jan 4, 11:57 pm, belinda thom <[EMAIL PROTECTED]> wrote:
...
> So, back to my question: is a catalog of standard python errors
> available? I've looked on the python site but had no success.
>>> [name for name in dir(__builtins__) if name.endswith('Error')]
['ArithmeticError', 'AssertionError',
belinda thom wrote:
> I imagine the NotImplementedError is actually a defined object, but I
> really don't know.
It is.
> So, back to my question: is a catalog of standard python errors
> available? I've looked on the python site but had no success.
http://docs.python.org/lib/module-excepti
belinda thom wrote:
> On Jan 4, 2007, at 9:28 PM, Carl Banks wrote:
>
> > jeremito wrote:
> >> I am writing a class that is intended to be subclassed. What is the
> >> proper way to indicate that a sub class must override a method?
> >
> > You can't (easily).
> >
> > If your subclass doesn't ove
In message <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> [3] I thought it was particularly cool how Tcl could bolt on a class
> based object oriented system as a library. The word "class" isn't
> built into the language, but that kind of evaluator lets you add it.
I have written about two notr
In message <[EMAIL PROTECTED]>, Paul
Hummer wrote:
> I learned PHP for ease of web application development ...
PHP is great for easily developing _insecure_ web applications. But if you
want them not to leak like a sieve, things get a bit more complicated.
--
http://mail.python.org/mailman/listi
[EMAIL PROTECTED] wrote:
> I have googled hard, and did see someone asking the same question, but
> haven't found a good solution to this problem. Could anyone give me a
> hint? Thanks a lot!
googling for "undefined symbol: __pure_virtual" brings up hundreds of
posts on this topic, and the ans
In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote:
> The scenario is as follows: Suppose the script starts with the line:
> #!/usr/bin/python
>
> (using #!/usr/bin/env python would be disastrous because the user could
> supply his own `python interpreter' in his PATH.)
>
> Now a malicious u
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > I have googled hard, and did see someone asking the same question, but
> > haven't found a good solution to this problem. Could anyone give me a
> > hint? Thanks a lot!
>
> googling for "undefined symbol: __pure_virtual" brings up hundreds of
"John" <[EMAIL PROTECTED]> wrote:
>
>How do I find out the cache line length of a machine in python?
How would that piece of information be valuable in Python? There isn't
anything you can do to take advantage of it in Python.
You can look up the L2 and L3 cache size and speed using WMI (assumin
101 - 119 of 119 matches
Mail list logo