On Fri, Feb 10, 2017, at 11:05 AM, Chris Angelico wrote:
> * What would the __name__ be? In "def ham.spam():", is the name "spam"
> or "ham.spam"? Or say you have "def x[0]():" - is the name "x[0]" or
> something else?
I'd say 'spam' in the first case, and a special value like '' in the latter.
On Tue, Feb 7, 2017, at 02:29 PM, Steve Dower wrote:
> I think what we really want is a self-extractor that "installs" into
> the user's AppData directory without prompting for admin.
There's a PR in the works for Pynsist that will add a non-admin per-user
install into AppData:
On Sat, Jan 28, 2017, at 11:26 AM, Paul Moore wrote:
> I'm working on
> a project to bundle a working zipapp with the embedded distribution to
> make a standalone exe - would having something like that make any
> difference in your environment?
I'd be interested in this, and whether there's any
On Tue, Jan 31, 2017, at 02:32 PM, Stephen J. Turnbull wrote:
> Personally, I don't think the explicit invocation is such a big deal
> to need a standardized decorator in the stdlib.
+1. It's one line either way, and the explicit call to super() seems
clearer for people reading the code.
On Wed, Jan 25, 2017, at 03:58 PM, Todd wrote:
> On Wed, Jan 25, 2017 at 10:45 AM, Thomas Kluyver
> <tho...@kluyver.me.uk> wrote:
>> __You might not, but it seems like an attractive nuisance. You can't
>> reliably use it as a test for .tar.gz files, but it would be easy
On Wed, Jan 25, 2017, at 03:54 PM, Todd wrote:
> Those [.tar.foo] are just examples that I encounter a lot, there can
> be other cases where multiple extensions are used.
The real issue is that there's no definition of what an extension is.
You can have dots anywhere in a filename, and it's not
On Wed, Jan 25, 2017, at 03:33 PM, Todd wrote:
> On Wed, Jan 25, 2017 at 10:18 AM, Petr Viktorin
> wrote:
>> But what if the .tar.gz file is called "spam-4.2.5-final.tar.gz"?
>> Existing tools like glob and endswith() can deal with the ".tar.gz"
>> extension reliably, but
Not uncommonly, I want to do something like this in code:
import signal
# Install my own signal handler
prev_hup = signal.signal(signal.SIGHUP, my_handler)
prev_term = signal.signal(signal.SIGTERM, my_handler)
try:
do_something_else()
finally:
# Restore previous signal handlers