On Fri, Dec 11, 2009 at 12:05 PM, Kevin Ar18 <span dir="ltr"><<a href="mailto:kevinar18@hotmail.com">kevinar18@hotmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
I am aware of the fact that you can somehow replace the __builtins__ in Python. There is a library here that modifies the >> binary builtins: <a href="http://github.com/aht/stream.py/blob/master/stream.py" target="_blank">http://github.com/aht/stream.py/blob/master/stream.py</a><br>
<br>Question: Is there anywhere that explains in detail how to modify the builtins in Python like this library did?<br></div></blockquote><div><br>I did some google and I didn't find anything useful, either. The unofficial doc on <a href="http://effbot.org">effbot.org</a> gives "See __add__", which is fair enough.<br>
<br>I believe you're after __rshift__ [that is >>], __lshift__ [which is <<], as starters. There are also __rrshift__ and __rlshift__, but not as useful.<br><br>What did you need this anyway? Just curious.<br>
<br>Cheers,<br>Xav<br></div></div>