Re: The ternaery operator

2017-03-16 Thread William Mayor
> > I think it would be nice to have a way of getting the 'true' > value as the return with an optional value if false. The desire > comes about when the thing I'm comparing is an element of a collection: > >drugs['choice'] if drugs['choice'] else 'pot' > > Then I'm tempted to do: > >

Re: ImportError: The ``fake-factory`` package is now called ``Faker``.

2016-12-20 Thread William Mayor
I came across this error this morning. In my case I was running a script that did this: “pip install fake-factory” The install worked properly but then I couldn’t import the library (with the same error message as you). I had to update the pip install command to say “pip install Faker” and then