Thank you
On Sat, Jun 26, 2021 at 8:10 PM Guido van Rossum wrote:
> Okay, then Chris Barker’s explanation applies.
>
> On Sat, Jun 26, 2021 at 16:35 Daniel Walker wrote:
>
>> I wasn't looking at the type stub but cmd.py itself. It has
>>
>> PROMPT = '
Found the mypy bug:
https://github.com/python/mypy/issues/4125
On Sat, Jun 26, 2021 at 7:35 PM Daniel Walker wrote:
> I wasn't looking at the type stub but cmd.py itself. It has
>
> PROMPT = '(Cmd) '
> ...
>
> class Cmd:
> prompt = PROMPT
> ...
>
> O
I wasn't looking at the type stub but cmd.py itself. It has
PROMPT = '(Cmd) '
...
class Cmd:
prompt = PROMPT
...
On Sat, Jun 26, 2021 at 6:04 PM Guido van Rossum wrote:
> On Sat, Jun 26, 2021 at 9:25 AM Daniel Walker wrote:
>
>> I was recently using the cmd module f
Sorry, that implementation should have been
class Cmd:
PROMPT = '> '
@property
def prompt(self) -> str:
return self.PROMPT
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to
I was recently using the cmd module for a project where my CLI
could connect to and interact with another host. I implemented prompt in
such a way that it would show the IP address when connected. I.e.,
class MyCmd(cmd.Cmd):
...
@property
def prompt(self) -> str:
if