On 10/06/2024 09.32, Stefan Ram wrote:
"Michael F. Stemper" <michael.stem...@gmail.com> wrote or quoted:
On 08/06/2024 14.18, Rob Cliffe wrote:
OK, here is the advanced version:
import os
class _cls(object):
def __repr__(self):
os.system('cls')
return ''
cls = _cls()
...
Why have it return anything at all?
Because __repr__ needs to return a str.
Got it. Thanks for clarifying.
--
Michael F. Stemper
87.3% of all statistics are made up by the person giving them.
--
https://mail.python.org/mailman/listinfo/python-list