Sapphire_Brick
Sapphire_Brick

Reputation: 1682

Is it possible to overload the set() function?

I know that most python built-in functions cannot be overloaded, and some like int(), float(), and bool() can; is it possible with set()?. There is already an unrelated __set__ method used for setting properties, but if int() can be overloaded, can set()?

Upvotes: 0

Views: 62

Answers (1)

John Kugelman
John Kugelman

Reputation: 362187

No, there is no magic __method__ that lets you override set().

Upvotes: 1

Related Questions