On Jan 3, 10:23 am, r rt8...@gmail.com wrote:
On Jan 2, 7:46 pm, Steven D'Aprano st...@remove-this-cybersource.com.au
wrote:
...incessant rambling about a news reader , 101 excuses for butting
into a thread
[snip]
... public display of ignorance of newsgroup ethics, 101 excuses for
not
r wrote:
On Jan 1, 4:40 pm, Robert Kern robert.k...@gmail.com wrote:
Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
as an obvious example I might want to initialize a 4x4 matrix with either 16
floats, a list/tuple or 16
On Jan 2, 1:46 pm, Robert Kern robert.k...@gmail.com wrote:
r wrote:
On Jan 1, 4:40 pm, Robert Kern robert.k...@gmail.com wrote:
Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
as an obvious example I might want to
12:12 PM
To: python-list@python.org
Subject: Re: type conversion
On Jan 2, 1:46 pm, Robert Kern robert.k...@gmail.com wrote:
r wrote:
On Jan 1, 4:40 pm, Robert Kern robert.k...@gmail.com wrote:
Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety
Hamish McKenzie schrieb:
I actually have no idea what ur talking about... aren't conversations
threaded by subject?
Nope, they are threaded by message id. The subject is used as fallback only.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 02 Jan 2009 15:49:25 -0800, Hamish McKenzie wrote:
I actually have no idea what ur talking about... aren't conversations
threaded by subject?
Not usually. When you hit Reply to a post, your post gets a hidden header
line that says I'm a reply to post #12345 (whatever post number it
On Jan 2, 7:46 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
...incessant rambling about a news reader , 101 excuses for butting
into a thread
[snip]
Throw your newsreader in the garbage and use Google groups, less
headache, more filling! No need to worry about
hidden headers
Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
as an obvious example I might want to initialize a 4x4 matrix with either 16
floats, a list/tuple or 16 floats, another matrix or a quaternion.
is there any other way to do it
You could also use a dict with type:method key/value pairings. This is
closer to a switch/case than an if...elif chain is.
of course, that's a great idea...
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 1, 4:40 pm, Robert Kern robert.k...@gmail.com wrote:
Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
as an obvious example I might want to initialize a 4x4 matrix with either
16 floats, a list/tuple or 16
On Wed, 31 Dec 2008 12:35:20 -0800, Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
Type conversion is a bit of a misleading subject line. You're not really
converting different types, just initialising from different types.
On Wed, Dec 31, 2008 at 5:26 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Wed, 31 Dec 2008 12:35:20 -0800, Hamish McKenzie wrote:
sometimes I want to be able to initialize an instance with a variety of
different data types.
Type conversion is a bit of a misleading
KraftDiner wrote:
I have the following code...
import array
len32 = array.array('L')
len16 = array.array('H')
len32.append(0)
len16.append(0)
y = len32[0]
print y.__class__
type 'long'
z = len16[0]
print z.__class__
type 'int'
how can I change Zs type to long?
z_long = long(z)
Rob Cowie wrote:
KraftDiner wrote:
I have the following code...
import array
len32 = array.array('L')
len16 = array.array('H')
len32.append(0)
len16.append(0)
y = len32[0]
print y.__class__
type 'long'
z = len16[0]
print z.__class__
type 'int'
how can I change
KraftDiner wrote:
In C++ you can cast one class type to another if you override the
operator=
Then you can convert one class type to another...
In Python it would appear that the left hand side of the assignment
operator
is not used to determine if a cast is necessary.
So how would I do
KraftDiner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
In C++ you can cast one class type to another if you override the
operator=
Then you can convert one class type to another...
In Python it would appear that the left hand side of the assignment
operator
is not used to
16 matches
Mail list logo