Then what about: obj $isinstance Iterable or obj $isinstance$ Iterable or obj *isinstance Iterable or obj isinstance? Iterable
These don't use the backtick charackter (wich on some setups even is a unicode char not from 7bit ascii).
On 07/22/2010 01:17 AM, Chris Rebert wrote:
On Wed, Jul 21, 2010 at 3:37 PM, Dag Odenhalldag.firstname.lastname@example.org wrote:
It could help readability if binary (arity of 2) functions could be applied infix with some syntax. For example, borrowing from Haskell, the backtick could be reintroduced for this purpose.
Good examples for this are isinstance and hasattr:
if some_object `isinstance` Iterable: ... elif some_object `hasattr` '__iter__':
Already proposed (by me) and rejected by the BDFL: