Hi,
I have found that it is possible to reassign the instance.__class__
reference to the same class (but after reloading) to make the
isinstance() test work again! I know that it is a kind of hacking of
the Python interpreter, but it works :-)
--
Tlis schrieb:
Hi,
I have found that it is possible to reassign the instance.__class__
reference to the same class (but after reloading) to make the
isinstance() test work again! I know that it is a kind of hacking of
the Python interpreter, but it works :-)
It's not especially hacking
Tlis schrieb:
On 5 Dec, 13:18, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and IMHO
shouldn't be used at all - as tempting it might be.
I disagree -- I find
On Thu, 06 Dec 2007 12:21:01 +0100, Diez B. Roggisch [EMAIL PROTECTED]
wrote:
Tlis schrieb:
On 5 Dec, 13:18, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and
Jean-Paul Calderone schrieb:
On Thu, 06 Dec 2007 12:21:01 +0100, Diez B. Roggisch
[EMAIL PROTECTED] wrote:
Tlis schrieb:
On 5 Dec, 13:18, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason
On Thu, 06 Dec 2007 13:59:00 +0100, Diez B. Roggisch [EMAIL PROTECTED]
wrote:
[snip]
Who says it isn't feasible?
http://twistedmatrix.com/trac/browser/trunk/twisted/python/rebuild.py
Nice try - for sure. But it seems to be geared towards special cases,
not a general-purpose now reloading
Steven D'Aprano wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and IMHO
shouldn't be used at all - as tempting it might be.
I disagree -- I find reload() extremely useful for interactively testing
modules.
En Wed, 05 Dec 2007 15:06:43 -0300, Tlis [EMAIL PROTECTED] escribi�:
With all the problems of the reload() function, I still hope, that
there should be possible to write a safe module 'reloader', that would
fix the references, as required (e.g. by changing the
variable.__class__ references).
On 5 Dec, 13:18, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and IMHO
shouldn't be used at all - as tempting it might be.
I disagree -- I find reload()
On Dec 5, 2007 12:06 PM, Tlis [EMAIL PROTECTED] wrote:
On 5 Dec, 13:18, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and IMHO
shouldn't be used at all - as
On Tue, 04 Dec 2007 15:41:48 +0100, Diez B. Roggisch wrote:
You just discovered one reason why reload() is a bad idea and IMHO
shouldn't be used at all - as tempting it might be.
I disagree -- I find reload() extremely useful for interactively testing
modules. But I would never dream of
I am using a software system with an embedded Python interpreter
(version 2.3) for scripting. The KcsPoint2D.py module contains a
Point2D class with the following method:
def SetFromMidpoint(self, p1, p2):
if not isinstance(p1, Point2D) or not isinstance(p2, Point2D):
raise TypeError,
Tlis wrote:
I am using a software system with an embedded Python interpreter
(version 2.3) for scripting. The KcsPoint2D.py module contains a
Point2D class with the following method:
def SetFromMidpoint(self, p1, p2):
if not isinstance(p1, Point2D) or not isinstance(p2, Point2D):
13 matches
Mail list logo