Recently I needed to do just that on an API and went with the decorator
approach.
Having this on the stdlib would be nice, and we can make it more powerful
than just raising a warning. For instance, we could attach a `deprecated =
True`
to the function object so that framework authors can use that
On Thu, 29 Jul 2021 at 16:00, Paul Moore wrote:
>
> On Thu, 29 Jul 2021 at 15:39, Leonardo Freua
> wrote:
> >
> > Would it be interesting to create a @deprecated decorator to avoid adding
> > warnings.warn("deprecation message", DeprecationWarning, stacklevel=2) in
> > methods body?
>
> I don't
Hi.
If there is possible to connect and login to ftp server within __init__, I
think it would make sense to add parameter **port** in ftplib.FTP. It could
look like this:
```
def __init__(self, host='', port=0, user='', passwd='', acct='',
timeout=_GLOBAL_DEFAULT_TIMEOUT, so
Marty writes:
> If there is possible to connect and login to ftp server within
> __init__, I think it would make sense to add parameter **port** in
> ftplib.FTP. It could look like this:
> ```
> def __init__(self, host='', port=0, user='', passwd='', acct='',
> timeout=