Re: Temporary variables in list comprehensions

2017-01-09 Thread Antonio Caminero Garcia
On Sunday, January 8, 2017 at 7:53:37 PM UTC-8, Steven D'Aprano wrote: > Suppose you have an expensive calculation that gets used two or more times in > a > loop. The obvious way to avoid calculating it twice in an ordinary loop is > with > a temporary variable: > > result = [] > for x in data

Re: Search a sequence for its minimum and stop as soon as the lowest possible value is found

2017-01-08 Thread Antonio Caminero Garcia
On Friday, January 6, 2017 at 6:04:33 AM UTC-8, Peter Otten wrote: > Example: you are looking for the minimum absolute value in a series of > integers. As soon as you encounter the first 0 it's unnecessary extra work > to check the remaining values, but the builtin min() will continue. > > The s

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Antonio Caminero Garcia
On Wednesday, January 4, 2017 at 1:10:04 PM UTC-8, Dietmar Schwertberger wrote: > On 04.01.2017 07:54, Antonio Caminero Garcia wrote: > > Unfortunately most of the time I am still using print and input functions. I know that sucks, I did not use the pdb module, I guess that IDE debuggers

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Antonio Caminero Garcia
On Thursday, January 5, 2017 at 12:32:19 PM UTC-8, fpp wrote: > > On Thu, Jan 5, 2017 at 12:12 PM, Chris Clark > > wrote: > >> I want an IDE that I can use at work and home, linux and dare I say > >> windows. > >> Sublime, had to remove it from my work PC as it is not licensed. > >> Atom, loved it

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Antonio Caminero Garcia
On Thursday, January 5, 2017 at 9:51:17 AM UTC-8, ArnoB wrote: > On 02-01-17 12:38, Antonio Caminero Garcia wrote: > > Hello, I am having a hard time deciding what IDE or IDE-like code editor should I use. This can be overwhelming. > > > > So far, I have used Vim, Sublime, Ato

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-06 Thread Antonio Caminero Garcia
On Wednesday, January 4, 2017 at 1:10:04 PM UTC-8, Dietmar Schwertberger wrote: > On 04.01.2017 07:54, Antonio Caminero Garcia wrote: > > Unfortunately most of the time I am still using print and input functions. > > I know that sucks, I did not use the pdb module, I guess tha

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-06 Thread Antonio Caminero Garcia
On Thursday, January 5, 2017 at 9:51:17 AM UTC-8, ArnoB wrote: > On 02-01-17 12:38, Antonio Caminero Garcia wrote: > > Hello, I am having a hard time deciding what IDE or IDE-like code editor > > should I use. This can be overwhelming. > > > > So far, I have used Vim,

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-06 Thread Antonio Caminero Garcia
On Thursday, January 5, 2017 at 12:32:19 PM UTC-8, fpp wrote: > > On Thu, Jan 5, 2017 at 12:12 PM, Chris Clark > > wrote: > >> I want an IDE that I can use at work and home, linux and dare I say > >> windows. > >> Sublime, had to remove it from my work PC as it is not licensed. > >> Atom, loved i

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Antonio Caminero Garcia
On Tuesday, January 3, 2017 at 4:12:34 PM UTC-8, Dietmar Schwertberger wrote: > On 02.01.2017 12:38, Antonio Caminero Garcia wrote: > You did not try Wing IDE? It looks less like a spacecraft. Maybe you > like it. > Maybe the difference is that Wing is from Python people while th

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-03 Thread Antonio Caminero Garcia
On Tuesday, January 3, 2017 at 4:12:34 PM UTC-8, Dietmar Schwertberger wrote: > On 02.01.2017 12:38, Antonio Caminero Garcia wrote: > You did not try Wing IDE? It looks less like a spacecraft. Maybe you > like it. > Maybe the difference is that Wing is from Python people while the

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Antonio Caminero Garcia
Guys really thank you for your answers. Basically now I am more emphasizing in learning in depth a tool and get stick to it so I can get a fast workflow. Eventually I will learn Vim and its python developing setup, I know people who have been programming using Vim for almost 20 years and they di

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Antonio Caminero Garcia
On Monday, January 2, 2017 at 5:57:51 PM UTC-8, Steve D'Aprano wrote: > On Mon, 2 Jan 2017 10:38 pm, Antonio Caminero Garcia wrote: > > > Hello, I am having a hard time deciding what IDE or IDE-like code editor > > should I use. This can be overwhelming. > >

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Antonio Caminero Garcia
On Monday, January 2, 2017 at 8:24:29 AM UTC-8, Michael Torrie wrote: > On 01/02/2017 04:38 AM, Antonio Caminero Garcia wrote: > > The problem with Vim is the learning curve, so I know the very basic > > stuff, but obviously not enough for coding and I do not have time to > &

Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Antonio Caminero Garcia
Hello, I am having a hard time deciding what IDE or IDE-like code editor should I use. This can be overwhelming. So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, IntelliJ with Python plugin. The thing with the from-the-scratch full featured IDEs (Eclipse, IntelliJ, Pycharm

Re: repeat items in a list

2016-03-29 Thread Antonio Caminero Garcia
On Monday, March 28, 2016 at 11:26:08 PM UTC+2, Chris Angelico wrote: > On Tue, Mar 29, 2016 at 4:30 AM, Rob Gaddi > wrote: > > beliav...@aol.com wrote: > > > >> On Saturday, March 26, 2016 at 7:24:10 PM UTC-4, Erik wrote: > >>> > >>> Or, if you want to "import operator" first, you can use 'operat

Re: repeat items in a list

2016-03-27 Thread Antonio Caminero Garcia
On Sunday, March 27, 2016 at 11:52:22 AM UTC+2, larudwer wrote: > how about > > sorted(["a", "b"]*3) > ['a', 'a', 'a', 'b', 'b', 'b'] that's cooler, less efficient though and do not maintain the original order. In case such order was important, you should proceed as follows: If the elemen

Re: repeat items in a list

2016-03-27 Thread Antonio Caminero Garcia
On Sunday, March 27, 2016 at 10:02:44 AM UTC+2, Antonio Caminero Garcia wrote: > On Saturday, March 26, 2016 at 11:12:58 PM UTC+1, beli...@aol.com wrote: > > I can create a list that has repeated elements of another list as follows: > > > > xx = ["a","

Re: repeat items in a list

2016-03-27 Thread Antonio Caminero Garcia
On Saturday, March 26, 2016 at 11:12:58 PM UTC+1, beli...@aol.com wrote: > I can create a list that has repeated elements of another list as follows: > > xx = ["a","b"] > nrep = 3 > print xx > yy = [] > for aa in xx: > for i in range(nrep): > yy.append(aa) > print yy > > output: > ['a