> From: Steven D'Aprano
>
> I fear that you haven't grasped the fundamental difference between
> gradual static typing of a dynamically-typed language like Python, and
> non-gradual typing of statically-typed languages like C, Haskell, Java,
> etc. Your statement seems like a reasonable fear if yo
Hi Python enthusiasts,
Currently _ssl.c always reports CERTIFICATE_VERIFY_FAILED for any
certification verification errors. In OpenSSL, it's possible to tell from
different reasons that lead to CERTIFICATE_VERIFY_FAILED. For example,
https://expired.badssl.com/ reports X509_V_ERR_CERT_HAS_EXPIRED,
On 2016-09-09 12:23, Chi Hsuan Yen wrote:
> Hi Python enthusiasts,
>
> Currently _ssl.c always reports CERTIFICATE_VERIFY_FAILED for any
> certification verification errors. In OpenSSL, it's possible to tell
> from different reasons that lead to CERTIFICATE_VERIFY_FAILED. For
> example, https://ex
What is to stop you from adding this to micropython as a library
extension? I've never felt the urge to do this and I don't think I've
ever heard it requested before. If you think it should be in the
stdlib, given the timing of the 3.6 feature freeze the earliest time
it could land would be Python
On Sat, Sep 10, 2016 at 1:16 AM, Christian Heimes
wrote:
> On 2016-09-09 12:23, Chi Hsuan Yen wrote:
> > Hi Python enthusiasts,
> >
> > Currently _ssl.c always reports CERTIFICATE_VERIFY_FAILED for any
> > certification verification errors. In OpenSSL, it's possible to tell
> > from different rea
On Thu, 8 Sep 2016 at 21:36 Damien George wrote:
> Hi all,
>
> When starting CPython from the command line you can pass the -O option
> to enable optimisations (eg `assert 0` won't raise an exception when
> -O is passed). But, AFAIK, there is no way to change the optimisation
> level after the i
I very much doubt that one assert might depend on another, and if they
do, we can just tell people not to change the debug level. The API to
change this should set __debug__ appropriately.
On Fri, Sep 9, 2016 at 10:20 AM, Brett Cannon wrote:
>
>
> On Thu, 8 Sep 2016 at 21:36 Damien George wrote:
Sometimes I find myself in need of this nice operator that I used back in
the days when I was programming in .NET, essentially an expression
>>> expr ?? instead
should return expr when it `is not None` and `instead` otherwise.
A piece of code that I just wrote, you can see a use case:
def _
On Sat, Sep 10, 2016 at 6:01 AM, Arek Bulski wrote:
> Sometimes I find myself in need of this nice operator that I used back in
> the days when I was programming in .NET, essentially an expression
>
expr ?? instead
>
> should return expr when it `is not None` and `instead` otherwise.
You can
On Fri, Sep 9, 2016 at 3:01 PM, Arek Bulski wrote:
> Sometimes I find myself in need of this nice operator that I used back in
> the days when I was programming in .NET, essentially an expression
>
expr ?? instead
>
> should return expr when it `is not None` and `instead` otherwise.
>
> A pie
This idea has come up before. While I can see the use of it, to me at
least that use doesn't feel nearly common enough to warrant dedicated
syntax.
In many cases, it is a "truthy" value you are looking for rather than `is
not None` specifically. That has a convenient spelling:
expr or instead
I'd note you can also save 4 characters by writing:
instead if expr is None else expr
On Fri, Sep 9, 2016 at 1:10 PM, David Mertz wrote:
> This idea has come up before. While I can see the use of it, to me at
> least that use doesn't feel nearly common enough to warrant dedicated
> syntax.
>
On 2016-09-09 21:01, Arek Bulski wrote:
Sometimes I find myself in need of this nice operator that I used back
in the days when I was programming in .NET, essentially an expression
expr ?? instead
should return expr when it `is not None` and `instead` otherwise.
A piece of code that I just w
> What is to stop you from adding this to micropython as a library
> extension?
That's what I would like to do, and usually we do just go ahead and
add our own extensions, trying to be Pythonic as possible :)
But we do that a lot and sometimes I think it would be good to discuss
with upstream (ie
On 2016-09-10 01:04, Damien George wrote:
What is to stop you from adding this to micropython as a library
extension?
That's what I would like to do, and usually we do just go ahead and
add our own extensions, trying to be Pythonic as possible :)
But we do that a lot and sometimes I think it w
On Fri, Sep 09, 2016 at 10:01:44PM +0200, Arek Bulski wrote:
> Sometimes I find myself in need of this nice operator that I used back in
> the days when I was programming in .NET, essentially an expression
>
> >>> expr ?? instead
>
> should return expr when it `is not None` and `instead` otherwis
On Sat, Sep 10, 2016 at 10:04:46AM +1000, Damien George wrote:
> I guess my main question to this list is: if CPython were to add a
> function to change the optimisation level at runtime, what would it
> look like?
I don't think it would look like sys.optimize(flag). At the very least,
it would
There are also peephole optimization.
Removing it may prevent false positives for coverage tool
http://bugs.python.org/issue2506
On Sat, Sep 10, 2016 at 4:01 AM Steven D'Aprano wrote:
> On Sat, Sep 10, 2016 at 10:04:46AM +1000, Damien George wrote:
>
> > I guess my main question to this list is:
18 matches
Mail list logo