<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#330033" bgcolor="#ffffff">
On 11/27/2010 2:51 AM, Nick Coghlan wrote:
<blockquote
cite="mid:AANLkTi=YrBoLAH+Y3p9ay7LH_tc=+YvV4mRbEZvJmw_Q@mail.gmail.com"
type="cite">
<pre wrap="">Not quite. I'm suggesting a factory function that works for any value,
and derives the parent class from the type of the supplied value.
</pre>
</blockquote>
<br>
Nick, thanks for the much better implementation than I achieved; you
seem to have the same goals as my implementation. I learned a bit
making mine, and more understanding yours to some degree. What I
still don't understand about your implementation, is that when
adding one additional line to your file, it fails:<br>
<br>
w = named_value("ABC", z )<br>
<br>
Now I can understand why it might not be a good thing to make a
named value of a named value (confusing, at least), but I was
surprised, and still do not understand, that it failed reporting the
__new__() takes exactly 3 arguments (2 given).<br>
<br>
<br>
</body>
</html>