homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dtorp
Recipients
Date 2005年05月19日.19:54:34
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Let: 
 1 >> -4 
be interpreted as:
 1 << 4
This should be easy to do. It would be somewhat helpful for 
bit manipulations and multiplying by powers of two. Without 
the change, my code is laced with sections like:
if y > 0:
 z = x << y
else:
 z = x >> -y
This is ugly and slow compared to a straight:
 z = x << y
There is a precedent. See what is done with negative list 
indices for comparison. It saves even less code with x[len
(x)-i] becoming x[i]. The reason for doing it is code 
simplication and clarity.
History
Date User Action Args
2008年01月20日 09:59:38adminlinkissue1205239 messages
2008年01月20日 09:59:38admincreate

AltStyle によって変換されたページ (->オリジナル) /