Re: Output showing "None" in Terminal

2020-08-25 Thread dn via Python-list
On 25/08/2020 01:12, Py Noob wrote: Hi! i'm new to python and would like some help with something i was working on from a tutorial. I'm using VScode with 3.7.0 version on Windows 7. Below is my code and the terminal is showing the word "None" everytime I execute my code. Many thanks! print("Co

Re: ABC with abstractmethod: kwargs on Base, explicit names on implementation

2020-08-25 Thread Dieter Maurer
Samuel Marks wrote at 2020-8-24 18:24 +1000: >After a discussion on #python on Freenode, I'm here. > >The gist of it is: >> Falc - Signature of method 'Pharm.foo()' does not match signature of base >> method in class 'Base' > >What's the right way of specialising the children and leaving the Base

Re: Whitespace not/required

2020-08-25 Thread Peter J. Holzer
On 2020-08-14 16:29:18 +1200, dn via Python-list wrote: > For f-strings/formatted string literals, the most usual form is: > > "{" f_expression ["="] ["!" conversion] [":" format_spec] "}" > > Remembering that this is BNF, see the space separating the closing-brace > from anything preceding i

RE: Output showing "None" in Terminal

2020-08-25 Thread Schachner, Joseph
The very first line of your function km_mi(): ends it: def km_mi(): return answer answer has not been assigned, so it returns None. Advice: remove that "return" line from there. Also get rid of the last line, answer = km_mi which makes answer refer to the function km_mi(). Put the "return a