Sebastian Steins wrote:
Over the last few weeks I've build a hacker news clone for the Python community:
https://news.python.sc
The source is at github.com/sebst/pythonic-news
that looks interesting. thanks.
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 19 Oct 2019 21:58:23 -0700
Paul Rubin wrote:
> Manfred Lotz writes:
> > def main():
> > print(greeting(1))
> >
> > Any idea why mypy doesn't detect anything?
>
>
> "main" doesn't have a type signature so it doesn't get checked. The
> mypy docs explain this. Try:
>
> def main
I had a look into type checking and tried a very simple example like
the following:
#!/usr/bin/env python3
def greeting(name: str) -> str:
return 'Hello ' + name
def main():
print(greeting(1))
if __name__ == "__main__":
main()
pytype complained as expected.
BUT mypy says;
S
Greetings,
I'm wealful to announce the immediate availability of Python 2.7.17, another
bugfix release in the Python 2.7 series. Downloads are on python.org:
https://www.python.org/downloads/release/python-2717/
No code changes occurred between the 2.7.17 release candidate and the final
re
On Sun, Oct 20, 2019 at 3:08 AM Steve White wrote:
> It would appear that if __hash__ returns the id, then that id is used
> internally as the key, and since the id is by definition unique, no
> key collision ever occurs -- at least in every Python implementation
> I've tried. It also seems that,
Am 19.10.2019 um 13:11 schrieb jf...@ms4.hinet.net:
For the two examples below:
(1)
class A:
... def foo(self):
... self.goo()
...
class B(A):
... def goo(self):
... print(1)
...
(2)
class A:
... def foo(self):
... self.goo()
... def goo(self): pass
Hi,
I have an application that would benefit from object instances
distinguished by identity being used in dict's and set's. To do this,
the __hash__ method must be overridden, the obvious return value being
the instance's id.
This works flawlessly in extensive tests on several platforms, and on
On 18/10/2019 23:57, DL Neil wrote:
> On 17/10/19 7:52 AM, MRAB wrote:
>> On 2019-10-16 19:43, duncan smith wrote:
>>> On 16/10/2019 04:41, DL Neil wrote:
On 16/10/19 1:55 PM, duncan smith wrote:
> On 15/10/2019 21:36, DL Neil wrote:
>> On 16/10/19 12:38 AM, Rhodri James wrote:
>>>
On Sat, Oct 19, 2019 at 11:31 PM Vitaly Potyarkin wrote:
>
> On Fri, Oct 18, 2019 at 9:31 PM Chris Angelico wrote:
> > You mention a persistent Storage, merely in passing. I want to see
> > more about that. If that storage format is a nice easy thing to work
> > with (eg a set of JSON files), and
On Fri, Oct 18, 2019 at 9:31 PM Chris Angelico wrote:
> You mention a persistent Storage, merely in passing. I want to see
> more about that. If that storage format is a nice easy thing to work
> with (eg a set of JSON files), and is a documented and
> forward/backward-compatible format, it could
For the two examples below:
(1)
>>> class A:
... def foo(self):
... self.goo()
...
>>> class B(A):
... def goo(self):
... print(1)
...
(2)
>>> class A:
... def foo(self):
... self.goo()
... def goo(self): pass
...
>>> class B(A):
... def goo(self):
...
11 matches
Mail list logo