El jue, 10 jun 2021 a las 19:30, Cameron Simpson (<c...@cskk.id.au>) escribió:

> On 11Jun2021 10:01, Cameron Simpson <c...@cskk.id.au> wrote:
> >So your idea does not suck. But it may not motivate anyone to implement
> >it, or even to agreed that it should be implemented.
>
> It also struck me: functions with _no_ parameters are pretty rare.
>
> I had a glance through my own code and aside from some closures
> (functions within a running function, getting their variables from the
> enclosing scope) I've got a few which either access state from some
> global or which generate something standalone, eg a primes() function
> which just generates the primes starting from 2, a function I maybe even
> don't use. They are very few.
>
I got curious so I checked a large codebase I have access to. Out of 85540
functions, 8244 take no arguments. Many of them are test functions.


>
> So these seem pretty rare. Just how often do you write such a function
> yourself? Got a real world example?
>
> I'm making an argument that this is already a pretty niche situation
> here.
>
> Cheers,
> Cameron Simpson <c...@cskk.id.au>
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/UXDUUDLJT4JASMBOM7TJXL36MGD3BYI2/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/OX73FEXG5LOGGMBWBIEVU443P55Y3VBA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to