Re: Why float('Nan') == float('Nan') is False

2019-02-13 Thread Test Bot
This definition of NaN is much better in mentally visualizing all the so called bizarreness of IEEE. This also makes intuitive that no 2 NaN will be equal just as no 2 infinities would be equal. I believe in a hypothesis(of my own creation) that any arithmetic on a data type of NaN would be similar

Re: Lifetime of a local reference

2019-02-27 Thread Test Bot
Just to add on regarding file I/O. It would be more pythonic to use. with open(path): do_stuff() On Wed, Feb 27, 2019, 3:31 AM Marko Rauhamaa wrote: > > Consider this function: > > def fun(): > f = open("lock") > flock.flock(f, fcntl.LOCK_EX) > do_stuff() >

Re: Managing pipenv virtualenvs

2019-03-26 Thread Test Bot
Nothing much i think. If you are properly managing dependencies for each venv, then each new venv should have the same state as the previous one along with some extra dependencies for each new chapter (haven't gone through the specific book, but I am assuming that in the book, every chapter builds

Re: Managing pipenv virtualenvs

2019-03-26 Thread Test Bot
ea of using pipenv/pip is to make the venv easy to recreate. That being said I would focus more on whether my pipfile/requirements.txt is maintained properly or not. If it is then spinning up the same venv is an easy task. On Wed, Mar 27, 2019, 4:21 AM Tim Johnson wrote: > * Test Bot [1903

Re: Search and Replace of string in a yaml file

2019-03-27 Thread Test Bot
Assuming you are asking about the logic at the uber level. You can try handling yaml file with pyyaml. It is a 3rd party package which has a good support for I/O related to yaml files. After you are able to read the data from the file, you need to apply your business logic to it. And log all the

Re: Handy utilities = Friday Filosofical Finking

2019-03-28 Thread Test Bot
+1 On Fri, Mar 29, 2019, 2:04 AM DL Neil wrote: > How do you keep, use, and maintain those handy snippets, functions, > classes... - units of code, which you employ over-and-over again? > > > Having coded 'stuff' once, most of us will keep units of code, > "utilities", which we expect will be us

Re: numpy results in segmentation fault

2019-09-16 Thread Test Bot
Thomas Jollans wrote: > Please reply on-list. (both of you) > > > Forwarded Message > Subject: Re: numpy results in segmentation fault > Date: Mon, 16 Sep 2019 17:04:57 +0530 > From: Test Bot > To: Pradeep Patra > CC: Thomas Jollans > > Firstly,

Unable to install Flask-Mongoengine

2019-12-15 Thread Test Bot
Hi Guys, I am unable to install *Flask-Mongoengine* using pip. Here are my specifications 1. *OS* => OSX 10.14.6 2. *Python* => Python 3.8.0 (Working in a virtualenv) 3. *Dependency Manager* => pip(19.3.1), setuptools(42.0.2) 3. *Flask-Mongoengine* => flask-mongoengine==0.9.5 I am inside my virt

Re: Unable to install Flask-Mongoengine

2019-12-15 Thread Test Bot
No help with using pip3 On Sun, Dec 15, 2019 at 2:49 PM tommy yama wrote: > how about pip3? > > On Sun, Dec 15, 2019 at 5:16 PM Test Bot wrote: > >> Hi Guys, >> >> I am unable to install *Flask-Mongoengine* using pip. Here are my >> specifications >&g

Re: Server side Blazor-like framework in Python?

2019-12-15 Thread Test Bot
+1 Though the implementation might be good from an exercise perspective. But there is a general philosophy in Software Engineering namely Separation of Concern. Python as a language is not concerned about the "Front-End" side of things since it is not meant for that. Though i am a very devote Py