On 10/23/22 14:20, Paulo da Silva wrote:
Às 21:58 de 22/10/22, Paulo da Silva escreveu:
Hi all!
What is the correct way, if any, of documenting a function/method?
Thank you all for the, valuable as usual, suggestions.
I am now able to make my choices.
Paulo
It also matters whether you exp
I head a small software team much of whose output is Python. I would
gratefully accept any of the formats you show below. My preference is #1.
--- Joseph S.
Teledyne Confidential; Commercially Sensitive Business Data
-Original Message-
From: Paulo da Silva
Sent: Saturday, October
Am Sun, Oct 23, 2022 at 05:16:48PM -0400 schrieb Thomas Passin:
> > def make_title_from_headline(self, p, h) -> str:
> >
> > def plot(self, stackposition=MAIN, clearFirst=True) -> None:
> 1. Knowing the type of a parameter isn't all you usually want to know;
Sure, as I said:
> >and use
Às 21:58 de 22/10/22, Paulo da Silva escreveu:
Hi all!
What is the correct way, if any, of documenting a function/method?
Thank you all for the, valuable as usual, suggestions.
I am now able to make my choices.
Paulo
--
https://mail.python.org/mailman/listinfo/python-list
On 10/23/2022 2:37 PM, Karsten Hilbert wrote:
Am Sat, Oct 22, 2022 at 09:49:55PM -0400 schrieb Thomas Passin:
def make_title_from_headline(self, p, h):
"""From node title, return title with over- and underline- strings.
...
RETURNS
a string
"""
def plot(self,
Am Sat, Oct 22, 2022 at 09:49:55PM -0400 schrieb Thomas Passin:
> def make_title_from_headline(self, p, h):
> """From node title, return title with over- and underline- strings.
...
>RETURNS
>a string
> """
> def plot(self, stackposition=MAIN, clearFirst=True):
> "
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
On Sep 29, 8:06 am, Chris Rebert wrote:
> Try this:
>
> def trial():
> class Foo(object):
> def __init__(self):
> print("Hello, world!")
> Foo()
> trial()
While this will display "Hello, world!" in the way required, with a
slight adjustment you end up with something po
HI
The class Foo you have defined is local NameSpace for trial functioon, for
details http://docs.python.org/tutorial/classes.html
def trial():
class Foo(object):
def __init__(self):
print("Hello, world!")
lacalClass = Foo()
>>>trial
"Hello, world!"
Thanks
Jitendra
On Thu, Sep 29, 2011 at
On Thu, Sep 29, 2011 at 7:53 AM, Tayfun Kayhan
wrote:
> def trial():
>class Foo(object):
> def __init__(self):
> print("Hello, world!")
> trial() # not worked, as expected.
Python doesn't have "class declarations" in the way that some other
languages do. The 'class' statement i
On Wed, Sep 28, 2011 at 2:53 PM, Tayfun Kayhan
wrote:
> I accidentally wrote such a code (below) while trying to write sth else for
> my application but i am now just wondering much how to run the class Foo, if
> it is possible. Is not it weird that Python does not give any error when I
> run it ?
12 matches
Mail list logo