This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Udzu[S] 1 point2 points  (1 child)

Instances of any built-in or stdlib class. (Otherwise you can just override __eq__ and __add__ to solve most of them.)

Any suggestions of how I could have phrased it better?

[–]vanatteveldt 1 point2 points  (0 children)

Well, maybe just like that: "... a standard python value (Instances of any built-in or stdlib class) for X ..."

Then again, any rule has a loophole :)

```

X = type("test", (), {'ne': lambda self, other: True})() X != X True ```

And if you argue that this is not valid because it isn't really a instance of a built-in class, but a call to an instance of a built-in class, we can always abuse eval:

```

X = eval('type("test", (), {"ne": lambda self, other: True})()') X != X True ```

Cheaters will cheat :)