Cameron Simpson於 2019年8月2日星期五 UTC+8上午6時25分00秒寫道:
> On 31Jul2019 19:16, Jach Fong wrote:
> >I get a package from Pypi. The package has many modules using built-in
> >open() function. I like to redefine all the open() there with the default
> >encoding 'utf-8', but not for code outside the package
On 31Jul2019 19:16, Jach Fong wrote:
I get a package from Pypi. The package has many modules using built-in open()
function. I like to redefine all the open() there with the default encoding
'utf-8', but not for code outside the package. Maybe I can put my def statement
at the beginning of ev
On 08/01/2019 01:06 PM, Daniel Okey-Okoro wrote:
[an idea]
Two things:
1) please do not cross-post.
2) a PEP is a very particular thing* -- please do not say you have one unless
you do. ;)
--
~Ethan~
* https://www.python.org/dev/peps/pep-0001/
--
https://mail.python.org/mailman/listinfo/
On 2019-08-01, Daniel Okey-Okoro wrote:
> But in many cases, when people write `if not val` they're checking if the
> val is `None`
>
> i.e. `if val is None`, `if val == None`
If they want to know if val is None, then they should be typing 'val
is None'. IMO, it's not an improvement to let them
On Thu, Aug 01, 2019 at 01:25:21PM -0700, Daniel Okey-Okoro wrote:
> Good point Calvin,
>
> But in many cases, when people write `if not val` they're checking if the
> val is `None`
>
> i.e. `if val is None`, `if val == None`
>
> (so in
On Thu, 01 Aug 2019 16:31:02 +0300, adam kabbara wrote:
> Hello I am having trouble with tkinter when I enter the command from tkinter
> import* I get an error message
>
What was the error and what version of Python are
you using?
For Python 2 you need... from Tkinter import*
--
GNU/Linux u
-- Forwarded message -
From: Daniel Okey-Okoro
Date: Thu, Aug 1, 2019 at 1:37 PM
Subject: Re: [Python-ideas] Re: PEP: add a `no` keyword as an alias for
`not`
To: Chris Angelico
> not a strong enough justification for breaking any code that uses "no" in
any other way.
This is a
-- Forwarded message -
From: Daniel Okey-Okoro
Date: Thu, Aug 1, 2019 at 1:24 PM
Subject: Re: PEP: add a `no` keyword as an alias for `not`
To: Calvin Spealman
Good point Calvin,
But in many cases, when people write `i
I think they actually read like they would mean slightly different things,
which would make them existing as aliases confusing.
I read `if not val` as "If val isn't true" but i would read `if no val` as
"if val does not exist"
On Thu, Aug 1, 2019 at 4:07 PM Daniel Okey-Okoro
wrote:
> I think th
I think that adding a `no` keyword as an alias for `not` would make for
more readable, simple, pythonic code.
Take the below:
```
if not val:
do_thing_because_value_is_falsy()
```
could be (is actually understood as):
```
if no val:
do_thing_because_value_is_falsy()
```
I think this PEP i
On 01/08/2019 19:06, Chris Angelico wrote:
On Fri, Aug 2, 2019 at 2:30 AM Rhodri James wrote:
Hi there, Adam!
On 01/08/2019 14:31, adam kabbara wrote:
Hello I am having trouble with tkinter when I enter the command from tkinter
import* I get an error message
What *exactly* did you type?
On Fri, Aug 2, 2019 at 2:30 AM Rhodri James wrote:
>
> Hi there, Adam!
>
> On 01/08/2019 14:31, adam kabbara wrote:
> > Hello I am having trouble with tkinter when I enter the command from
> > tkinter import* I get an error message
>
> What *exactly* did you type? Please cut-and-paste from your
Hi there, Adam!
On 01/08/2019 14:31, adam kabbara wrote:
Hello I am having trouble with tkinter when I enter the command from tkinter
import* I get an error message
What *exactly* did you type? Please cut-and-paste from your
console/editor into the email, don't just retype it. If you did
Hello I am having trouble with tkinter when I enter the command from tkinter
import* I get an error message
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
Sorry for spamming this is suppose send to tutor-ow...@python.org
On Thu, Aug 1, 2019 at 5:08 PM Sinardy Xing wrote:
> Hi,
>
> I am learning to create python logging.
>
> My goal is to create a logging module where I can use as decorator in my
> main app
>
> following is the logging code
>
> ---
Hi,
I am learning to create python logging.
My goal is to create a logging module where I can use as decorator in my
main app
following is the logging code
start here---
import logging
#DEBUG: Detailed information, typically of interest only when
diagnosing problems.
#INFO : Conf
On Thursday, August 1, 2019 at 7:57:31 AM UTC-7, Calvin Spealman wrote:
> Sorry, but you can't. If you have two python modules, neither has access to
> things in the other without an import.
>
> That's the whole point of an import.
>
> On Thu, Aug 1, 2019 at 10:30 AM Sidney Langweil
> wrote:
>
Sorry, but you can't. If you have two python modules, neither has access to
things in the other without an import.
That's the whole point of an import.
On Thu, Aug 1, 2019 at 10:30 AM Sidney Langweil
wrote:
> A Python script invokes a function in another file in the same directory.
>
> I would
A Python script invokes a function in another file in the same directory.
I would like to invoke that function without the need for an import.
I think I read that having an empty __init__.py is sufficient. But it does not
seem to work for me.
I'm sure this is obvious to many of you. Thanks in
On Thu, Aug 1, 2019 at 4:34 PM Terry Reedy wrote:
>
> On 7/31/2019 11:19 PM, jsals...@gmail.com wrote:
> > Honestly this is the only thing in over half a decade of daily python use
> > which has disappointed me enough to want to ask the devs:
> >
> print(1/)
> >File "", line 1
> > p
20 matches
Mail list logo