4 ms·
Python has dunder methods that allow you to override behaviour (eg operator overloading, hashing, object identity etc). In this case they’re overriding bitshif
by aidos 4y ago
Python has dunder methods that allow you to override behaviour (eg operator overloading, hashing, object identity etc).
In this case they’re overriding bitshifting. In terms of why, it does feel like a natural visual choice.
https://github.com/mingrammer/diagrams/blob/master/diagrams/__init__.py#L346 https://github.com/mingrammer/diagrams/blob/master/diagrams/...
- AtlasBarfed 4y agooperator overloading. One of the great holy wars of PL. Of course C++ has it, and it is one of the great footguns in its arsenal.
- aidos 4y agoWith great power comes great responsibility.