[Python-ideas] Suggestion: Clear screen command for the REPL

Steven D'Aprano steve at pearwood.info
Mon Sep 19 21:55:29 EDT 2016


On Mon, Sep 19, 2016 at 01:35:53PM -0700, João Matos wrote:
> Hello,
> 
> I don't see why creating a clear command would interfere with dict.clear() 
> which is a function/method.

For the same reason that you can't have a method called foo.while or 
foo.if or foo.raise. If clear is a "command" (a statement) it would need 
to be a keyword, like while, if and raise.


-- 
Steve


More information about the Python-ideas mailing list