On 9/9/2017 11:41 AM, Gustavo Carneiro wrote:
Hi, it is not clear whether anything is done to total_cost:
def total_cost(self) -> float:
Does this become a property automatically, or is it still a method
call? To that end, some examples of *using* a data class, not just
defining one, wo
I can't tell whether this was meant seriously, but I don't think it's worth
it. People can easily write their own dummy function and give it any damn
semantics they want. Let's reject the PEP.
On Sat, Sep 9, 2017 at 11:46 AM, Barry Warsaw wrote:
> I couldn’t resist one more PEP from the Core spr
Previous discussion: https://bugs.python.org/issue10049
Issue closed as rejected.
Victor
2017-09-09 14:33 GMT-07:00 Victor Stinner :
> I was able to find a real keyboard, so here is a more complete code:
> ---
> class Noop:
> def __call__(self, *args, **kw):
> return self
> def _
On Sat, Sep 9, 2017 at 10:54 PM, Victor Stinner
wrote:
> I always wanted this feature (no kidding).
>
> Would it be possible to add support for the context manager?
>
> with noop(): ...
>
> Maybe noop can be an instance of:
>
> class Noop:
> def __enter__(self, *args, **kw): return self
> def
On Sat, Sep 09, 2017 at 02:33:18PM -0700, Victor Stinner
wrote:
> I was able to find a real keyboard, so here is a more complete code:
> ---
> class Noop:
> def __call__(self, *args, **kw):
> return self
> def __enter__(self, *args, **kw):
> return self
> def __exit__(
I was able to find a real keyboard, so here is a more complete code:
---
class Noop:
def __call__(self, *args, **kw):
return self
def __enter__(self, *args, **kw):
return self
def __exit__(self, *args):
return
def __repr__(self):
return 'nope'
---
Ex
On Sat, 9 Sep 2017 11:46:30 -0700
Barry Warsaw wrote:
>
> Rationale
> =
>
> It is trivial to implement a no-op function in Python. It's so easy in fact
> that many people do it many times over and over again. It would be useful in
> many cases to have a common built-in function that do
09.09.17 21:46, Barry Warsaw пише:
One use case would be for PEP 553, where you could set the breakpoint
environment variable to the following in order to effectively disable it::
$ setenv PYTHONBREAKPOINT=noop
Are there other use cases? PEP 553 still is not approved, and you could
use o
I always wanted this feature (no kidding).
Would it be possible to add support for the context manager?
with noop(): ...
Maybe noop can be an instance of:
class Noop:
def __enter__(self, *args, **kw): return self
def __exit__(self, *args): pass
def __call__(self, *args, **kw): return self
I don't think the rationale justifies an entire builtin. You could just use
"PYTHONBREAKPOINT=int" to disable, or support "PYTHONBREAKPOINT=0" as I
think someone else suggested. I personally can't remember the last time I
needed a noop() function. I've more often needed an identity() function,
and
On 2017-09-09 19:46, Barry Warsaw wrote:
I couldn’t resist one more PEP from the Core sprint. I won’t reveal where or
how this one came to me.
-Barry
PEP: 559
Title: Built-in noop()
Author: Barry Warsaw
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 2017-09-08
Python-V
I couldn’t resist one more PEP from the Core sprint. I won’t reveal where or
how this one came to me.
-Barry
PEP: 559
Title: Built-in noop()
Author: Barry Warsaw
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 2017-09-08
Python-Version: 3.7
Post-History: 2017-09-09
Abst
On Sep 8, 2017 4:06 PM, "Eric Snow" wrote:
run(code):
Run the provided Python code in the interpreter, in the current
OS thread. If the interpreter is already running then raise
RuntimeError in the interpreter that called ``run()``.
The current interpreter (which ca
On Sep 9, 2017 9:07 AM, "Nick Coghlan" wrote:
To immediately realise some level of efficiency benefits from the
shared memory space between the main interpreter and subinterpreters,
I also think these low level FIFOs should be defined as accepting any
object that supports the PEP 3118 buffer pro
On 9 September 2017 at 01:04, Paul Moore wrote:
> On 9 September 2017 at 00:04, Eric Snow wrote:
>>add_recv_fifo(name=None):
>>
>> Create a new FIFO, associate the two ends with the involved
>> interpreters, and return the side associated with the interpreter
>> in which "ad
Hi, it is not clear whether anything is done to total_cost:
def total_cost(self) -> float:
Does this become a property automatically, or is it still a method call?
To that end, some examples of *using* a data class, not just defining one,
would be helpful.
If it remains a normal method, why
On 8 September 2017 at 12:40, Nathaniel Smith wrote:
> Would it make sense to also move signal handlers to run in this
> thread? Those are the other major source of nasty re-entrancy
> problems.
Python level signal handlers are already only run in the main thread,
so applications that want to ens
Hi, first post here.
My two cents:
Here's a list of "prior arts" that I have collected over the years, besides
attrs, that address similar needs (and often, much more):
- https://github.com/bluedynamics/plumber
- https://github.com/ionelmc/python-fields
- https://github.com/frasertweedale/elk
-
On Fri, Sep 8, 2017 at 4:37 PM, Nick Coghlan wrote:
> On 8 September 2017 at 00:30, Masayuki YAMAMOTO
> wrote:
>> Hi folks,
>>
>> I submit PEP 539 third draft for the finish. Thank you for all the advice
>> and the help!
>
> Thank you Erik & Yamamoto-san for all of your work on this PEP!
>
> The
On Fri, 8 Sep 2017 16:04:27 -0700
Eric Snow wrote:
>
> The module provides the following functions:
>
> ``list()``::
>
>Return a list of all existing interpreters.
It's called ``enumerate()`` in the threading module. Not sure there's
a point in choosing a different name here.
> The modul
2017-09-09 2:09 GMT+09:00 Nick Coghlan :
> [...]
> No, we genuinely want to consolidate that state into a single shared
> location. However, the struct definition can be adjusted as needed as
> part of the PEP 539 implementation (and we'll get Eric Snow to be one
> of the PR reviewers).
>
I see. I
On Sat, 9 Sep 2017 09:04:59 +0100
Paul Moore wrote:
> On 9 September 2017 at 00:04, Eric Snow wrote:
> >add_recv_fifo(name=None):
> >
> > Create a new FIFO, associate the two ends with the involved
> > interpreters, and return the side associated with the interpreter
> > in
On 9 September 2017 at 00:04, Eric Snow wrote:
>add_recv_fifo(name=None):
>
> Create a new FIFO, associate the two ends with the involved
> interpreters, and return the side associated with the interpreter
> in which "add_recv_fifo()" was called. A FIFOReader gets tied to
>
23 matches
Mail list logo