On 21 March 2017 at 00:23, Barry Warsaw wrote:
> On Mar 20, 2017, at 01:00 PM, Ivan Levkivskyi wrote:
>
> [SNIP]
>
> IIUC, the Python 3 way to spell this is with a decorator.
>
Thanks, I will update this.
> [SNIP]
> (also, since this is Python 3, do you really need to
On Mar 20, 2017, at 01:00 PM, Ivan Levkivskyi wrote:
>from zope.interface import Interface, Attribute, implements
>
>class IEmployee(Interface):
>
>name = Attribute("Name of employee")
>
>def do(work):
>"""Do some work"""
>
>class Employee(object):
>
On 20 March 2017 at 22:11, Matthias Kramm wrote:
> I'm a big fan of this. I really want structural subtyping for
> http://github.com/google/pytype.
>
>
I am glad you like it.
>
>
On Mon, Mar 20, 2017 at 5:00 AM, Ivan Levkivskyi
> wrote:
>
>> Explicitly
On Mar 20, 2017 1:26 PM, "Antoine Pitrou" wrote:
Hello Oleg,
On Mon, 20 Mar 2017 18:28:29 +0100
Oleg Nesterov wrote:
> I started to learn python a few days ago and I am trying to understand
what
> __del__() actually does. https://docs.python.org/3/
I'm a big fan of this. I really want structural subtyping for
http://github.com/google/pytype.
On Mon, Mar 20, 2017 at 5:00 AM, Ivan Levkivskyi
wrote:
> Explicitly declaring implementation
> ---
>
> To explicitly declare that a certain class
On 2017-03-20 20:23, Antoine Pitrou wrote:
Hello Oleg,
On Mon, 20 Mar 2017 18:28:29 +0100
Oleg Nesterov wrote:
I started to learn python a few days ago and I am trying to understand what
__del__() actually does. https://docs.python.org/3/reference/datamodel.html
says:
Hello Oleg,
On Mon, 20 Mar 2017 18:28:29 +0100
Oleg Nesterov wrote:
> I started to learn python a few days ago and I am trying to understand what
> __del__() actually does. https://docs.python.org/3/reference/datamodel.html
> says:
>
> object.__del__(self)
> ...
>
On Mon, 20 Mar 2017 13:26:34 +0200
Serhiy Storchaka wrote:
> What is the preferable way of getting the size of tuple, list, bytes,
> bytearray: Py_SIZE or PyTuple_GET_SIZE, PyList_GET_SIZE,
> PyBytes_GET_SIZE, PyByteArray_GET_SIZE? Are macros for concrete types
> more
On Mon, Mar 20, 2017, at 14:07, Brett Cannon wrote:
> What is a "trivial body"? I don't know of any such definition anywhere in
> Python so this is too loosely defined. You also don't say what happens if
> the body isn't trivial. Are tools expected to raise an error?
My assumption would be that a
On 20 March 2017 at 19:07, Brett Cannon wrote:
> I'm overall very supportive of seeing something like this make it into
> Python to further strengthen duck typing in the language.
>
Thanks!
> Personally, I think even an abstract method should be properly typed.
>
[SNIP]
>
or
I'm overall very supportive of seeing something like this make it into
Python to further strengthen duck typing in the language. I know I've
wanted something something like this since ABCs were introduced.
I personally only have one issue/clarification for the PEP.
On Mon, 20 Mar 2017 at 05:02
Hello,
Let me first clarify, I do not claim this is a bug, I am trying to learn
python and now I trying to understand yield-from.
This simple test-case
g = (x for x in range(10))
def fg():
for x in g:
yield x
print(next(fg()))
Hello,
I already tried to ask on python-list, see
https://mail.python.org/pipermail/python-list/2017-March/720037.html
but it seems that this list is not for technical questions.
Let me resend my question to python-dev. Please tell me if I should not spam
this list with newbiesh questions, and
On Mon, 20 Mar 2017 at 04:28 Serhiy Storchaka wrote:
> What is the preferable way of getting the size of tuple, list, bytes,
> bytearray: Py_SIZE or PyTuple_GET_SIZE, PyList_GET_SIZE,
> PyBytes_GET_SIZE, PyByteArray_GET_SIZE? Are macros for concrete types
> more preferable
Hi all,
PEP 484 specifies semantics for type hints. These type hints are used by
various tools, including static type checkers. However, PEP 484 only
specifies the semantics for nominal subtyping (subtyping based on
subclassing). Here we propose a specification for semantics of structural
What is the preferable way of getting the size of tuple, list, bytes,
bytearray: Py_SIZE or PyTuple_GET_SIZE, PyList_GET_SIZE,
PyBytes_GET_SIZE, PyByteArray_GET_SIZE? Are macros for concrete types
more preferable or they are outdated?
On one hand concrete type macros are longer than Py_SIZE,
16 matches
Mail list logo