Re: formatted docstrings

2019-04-03 Thread Cameron Simpson
On 04Apr2019 15:40, Ben Finney wrote: Cameron Simpson writes: To answer my own question ... On 04Apr2019 14:05, Cameron Simpson wrote: > Is it unreasonable to promote bare format strings as candidates for > the docstring? Sigh. Because such a string _should_ be evaluated in the runtime scope

Re: formatted docstrings

2019-04-03 Thread Ben Finney
Cameron Simpson writes: > To answer my own question ... > > On 04Apr2019 14:05, Cameron Simpson wrote: > > Is it unreasonable to promote bare format strings as candidates for > > the docstring? > > Sigh. Because such a string _should_ be evaluated in the runtime scope > context of the _called_ f

Re: formatted docstrings

2019-04-03 Thread Cameron Simpson
On 04Apr2019 14:14, Cameron Simpson wrote: Is it unreasonable to promote bare format strings as candidates for the docstring? Yes it is. But being annoyed by this I've written this decorator: def fmtdoc(func): ''' Decorator to replace a function's docstring with that string f

Re: formatted docstrings

2019-04-03 Thread Cameron Simpson
To answer my own question ... On 04Apr2019 14:05, Cameron Simpson wrote: I just wrote this (specifics changed for confidentiality reasons): DEFAULT_ENVVAR = 'APP_VALUE' def get_handle(setting=None): f'''Get a handle. Parameter: * `setting`: the application setting. Default

formatted docstrings

2019-04-03 Thread Cameron Simpson
I just wrote this (specifics changed for confidentiality reasons): DEFAULT_ENVVAR = 'APP_VALUE' def get_handle(setting=None): f'''Get a handle. Parameter: * `setting`: the application setting. Default from the {DEFAULT_ENVVAR} environment variable. ''' if setti

Django-hotsauce release 0.9.8

2019-04-03 Thread Soppy bear
Good morning, We are pleased to announce the following 6 new releases of django-hotsauce and related libraries: - libschevo 4.1 - libdurus 4.1 - libauthkit 0.5.2 - blogengine2 0.9.8 - django-hotsauce 0.9.8 - django-hotsauce-oauthclient 0.3 Download(s): https://pypi.org/project/django-hotsauce/

Re: scalable bottleneck

2019-04-03 Thread Sayth Renshaw
On Thursday, 4 April 2019 10:51:35 UTC+11, Paul Rubin wrote: > Sayth Renshaw writes: > > for x in range ( max_root ): > > 1) Do you see a memory bottleneck here? If so, what is it? > > 2) Can you think of a way to fix the memory bottleneck? > > In Python 2, range(n) creates a list in memory.

Re: scalable bottleneck

2019-04-03 Thread MRAB
On 2019-04-03 22:42, Sayth Renshaw wrote: In an email, I received this question as part of a newsletter. def fetch_squares ( max_root ): squares = [] for x in range ( max_root ): squares . append (x **2) return squares MAX = 5 for square in fetch_squares (MAX ): d

scalable bottleneck

2019-04-03 Thread Sayth Renshaw
In an email, I received this question as part of a newsletter. def fetch_squares ( max_root ): squares = [] for x in range ( max_root ): squares . append (x **2) return squares MAX = 5 for square in fetch_squares (MAX ): do_something_with ( square ) 1) Do you see a memo

Re: A request for examples of successful abstracts to scientific python conferences

2019-04-03 Thread Thomas Jollans
On 03/04/2019 18:18, Manolo Martínez wrote: > Dear all, > > I am thinking of submitting an abstract to EuroSciPy 2019, but (although > I am an academic), I am not familiar with the conventions, do's and > don'ts of submissions to CS conferences, and this one in particular. > Would any kind reader

A request for examples of successful abstracts to scientific python conferences

2019-04-03 Thread Manolo Martínez
Dear all, I am thinking of submitting an abstract to EuroSciPy 2019, but (although I am an academic), I am not familiar with the conventions, do's and don'ts of submissions to CS conferences, and this one in particular. Would any kind reader of this list be willing to share with me (off-list)

Re: Syntax for one-line "nonymous" functions in "declaration style"

2019-04-03 Thread Alexey Muranov
On mer., Apr 3, 2019 at 6:00 PM, python-list-requ...@python.org wrote: On Wed, Apr 3, 2019 at 3:55 AM Alexey Muranov wrote: I clarified what i meant by an assignment, and i believe it to be a usual meaning. 1. `def` is not an assignment, there is no left-hand side or right-hand side. I w

Re: fs package question - cp -p semantics when copying files?

2019-04-03 Thread Paul Moore
On Wed, 3 Apr 2019 at 16:06, Skip Montanaro wrote: > > > From a brief look at the docs, there's an on_copy callback to copy_fs. > > Maybe you could use the getinfo/setinfo methods to copy over the > > timestamps and any other file metadata that you want in that callback? > > Yes, I had gotten to t

Re: fs package question - cp -p semantics when copying files?

2019-04-03 Thread Skip Montanaro
> From a brief look at the docs, there's an on_copy callback to copy_fs. > Maybe you could use the getinfo/setinfo methods to copy over the > timestamps and any other file metadata that you want in that callback? Yes, I had gotten to that point when I first posted to the PyFilesystem Google Group.

Re: fs package question - cp -p semantics when copying files?

2019-04-03 Thread Paul Moore
On Wed, 3 Apr 2019 at 14:55, Skip Montanaro wrote: > It's part of a larger application which needs to copy files from a number > of locations, not all of which are filesystems on local or remote hosts > (think zip archives, s3 buckets, tar files, etc). In that application, I am > using the fs pack

Re: fs package question - cp -p semantics when copying files?

2019-04-03 Thread Skip Montanaro
> > Is there an (unstated) reason why you're using Python and not a system > tool such as rsync? > It's part of a larger application which needs to copy files from a number of locations, not all of which are filesystems on local or remote hosts (think zip archives, s3 buckets, tar files, etc). In