On 10/22/2022 4:58 PM, Paulo da Silva wrote:
Hi all!
What is the correct way, if any, of documenting a function/method?
1.
def foo(a,b):
""" A description.
a: Whatever 1
b: Whatever 2
"""
[snip]
5.
Any other ...
Any comments/suggestions are welcome.
Thanks.
Paulo
I don't think there is a "correct" way. It depends somewhat on what tools
you're using. I like pydocstyle, which I have hung off of vim with
syntastic. pydocstyle checks for https://peps.python.org/pep-0257/
conformance.
Also, rather than describe the types of formal parameters to functions in
Hi all!
What is the correct way, if any, of documenting a function/method?
1.
def foo(a,b):
""" A description.
a: Whatever 1
b: Whatever 2
"""
...
2.
def foo(a,b):
""" A description.
a -- Whatever 1
b -- Whatever 2
"""
On 2022-10-22 04:43, ishar jaiswal wrote:
my problem is not solving i sended you a message when i open python there
one error comes. then you why not taking action
[image: Screenshot (2).png]
This list does not accept screenshots. Please copy and paste the error.
--
https://mail.python.org/mailm
Cameron Simpson wrote:
> Stefan's code implements it's own format_field and falls back to the
> original format_field(). That's standard subclassing practice, and worth
> doing reflexively more of the time - it avoids _knowing_ that
> format_field() just calls format().
>
> So I'd take Stefan's
my problem is not solving i sended you a message when i open python there
one error comes. then you why not taking action
[image: Screenshot (2).png]
--
https://mail.python.org/mailman/listinfo/python-list
the fuck?
On Sat, Oct 22, 2022 at 9:06 AM Peter J. Holzer wrote:
> On 2022-10-19 12:10:52 +1100, Chris Angelico wrote:
> > On Wed, 19 Oct 2022 at 12:01, Peter J. Holzer wrote:
> > > On 2022-10-17 09:25:00 +0200, Karsten Hilbert wrote:
> > > > http://literateprogramming.com/
> > >
> > > Right. T
On 2022-10-22 15:04:58 +0200, Peter J. Holzer wrote:
> On 2022-10-19 12:10:52 +1100, Chris Angelico wrote:
> > On Wed, 19 Oct 2022 at 12:01, Peter J. Holzer wrote:
> > > On 2022-10-17 09:25:00 +0200, Karsten Hilbert wrote:
> > > > http://literateprogramming.com/
> > >
> > > Right. That's one of th
On 2022-10-19 12:10:52 +1100, Chris Angelico wrote:
> On Wed, 19 Oct 2022 at 12:01, Peter J. Holzer wrote:
> > On 2022-10-17 09:25:00 +0200, Karsten Hilbert wrote:
> > > http://literateprogramming.com/
> >
> > Right. That's one of the inspirations for my comment.
> >
> > But literate programming i