Python Long Masks

2008-05-14

x&y is a long when either x or y is a long. When it could/should be only when both are long.

In particular x&1 is a long whenever x is. Despite the fact that the numerical answer is either 0 or 1.

I’m not saying this is wrong, just… ugly.

Roll on Py3K.

About these ads

2 Responses to “Python Long Masks”

  1. Nick Barnes Says:

    Does Py3K abolish longs? They should have done that long ago (make long a synonym for int).

  2. drj11 Says:

    Apparently so. Scary reading, by the way.

    They clearly should have done it long ago. My opinion on things like this generally is that Common Lisp is the roadmap, so just get with the program and implement it. Stop fumbling around in the dark.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: