Re: IDLE: clearing the screen

Liste des GroupesRevenir à cl python 
Sujet : Re: IDLE: clearing the screen
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 10. Jun 2024, 16:32:41
Autres entêtes
Organisation : Stefan Ram
Message-ID : <repr-20240610153216@ram.dialup.fu-berlin.de>
References : 1 2 3
"Michael F. Stemper" <michael.stemper@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.

Date Sujet#  Auteur
8 Jun 24 * Re: IDLE: clearing the screen4Rob Cliffe
10 Jun 24 `* Re: IDLE: clearing the screen3Michael F. Stemper
10 Jun 24  `* Re: IDLE: clearing the screen2Stefan Ram
10 Jun 24   `- Re: IDLE: clearing the screen1Michael F. Stemper

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal