On Tue, Jan 24, 2012 at 5:44 PM, alex23 wrote:
> On Jan 24, 4:56 am, 8 Dihedral
> wrote:
>> I know manny python programmers just abandon the list comprehension
>> in non-trivial processes.
>
> Really? Observation of the python mailing list indicates the opposite:
> people seem inclined to use
On Jan 24, 4:56 am, 8 Dihedral
wrote:
> 在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道:
> > [line.strip('\n') for line in f]
>
> This is more powerful by turning an object to be iterable.
> But the list comprehension violates the basic operating
> principle of the iteratee chaining rule in pr
在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道:
> On 1/22/12 3:50 PM, Rick Johnson wrote:
> >
> > What does Python do when presented with this code?
> >
> > py> [line.strip('\n') for line in f.readlines()]
> >
> > If Python reads all the file lines first and THEN iterates AGAIN to do
> > the strip;
On 2012-01-22, Rick Johnson wrote:
> What does Python do when presented with this code?
It does what you tell it to. What else would you expect?
--
Grant Edwards grant.b.edwardsYow! Are we wet yet?
at
On Sun, 22 Jan 2012 07:50:59 -0800, Rick Johnson wrote:
> What does Python do when presented with this code?
>
> py> [line.strip('\n') for line in f.readlines()]
>
> If Python reads all the file lines first and THEN iterates AGAIN to do
> the strip; we are driving a Fred flintstone mobile.
Nons
On 01/22/2012 06:04 PM, Rick Johnson wrote:
> That's just the point. If an expert such as myself can make a simple
> mistake as this, then one can only expect that the neophytes are going
> to suffer greatly. I wonder how many tutorials are out there in WWW
> still teaching old ways of writing Pyth
On Jan 22, 6:38 pm, Michael Torrie wrote:
> On 01/22/2012 08:50 AM, Rick Johnson wrote:
>
>
>
> > What does Python do when presented with this code?
>
> > py> [line.strip('\n') for line in f.readlines()]
>
> > If Python reads all the file lines first and THEN iterates AGAIN to do
> > the strip; we
On 01/22/2012 08:50 AM, Rick Johnson wrote:
>
> What does Python do when presented with this code?
>
> py> [line.strip('\n') for line in f.readlines()]
>
> If Python reads all the file lines first and THEN iterates AGAIN to do
> the strip; we are driving a Fred flintstone mobile. If however Pyth
On 22 January 2012 20:57, Michael Poeltl wrote:
> > Two iterations. And since that is the only possible way to do this, you
> > are correct, the language is terribly archaic. I suggest you switch to
> > Ruby ASAP.
> why there is only one possibility to do so? in a second i found this
> ''.join(o
* Ian Kelly [2012-01-22 19:29]:
> On Sun, Jan 22, 2012 at 8:50 AM, Rick Johnson
> wrote:
>
> >
> > What does Python do when presented with this code?
> >
> > py> [line.strip('\n') for line in f.readlines()]
> >
> > If Python reads all the file lines first and THEN iterates AGAIN to do
> > the str
On Sun, Jan 22, 2012 at 8:50 AM, Rick Johnson
wrote:
>
> What does Python do when presented with this code?
>
> py> [line.strip('\n') for line in f.readlines()]
>
> If Python reads all the file lines first and THEN iterates AGAIN to do
> the strip; we are driving a Fred flintstone mobile. If howev
On 1/22/12 3:50 PM, Rick Johnson wrote:
What does Python do when presented with this code?
py> [line.strip('\n') for line in f.readlines()]
If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving a Fred flintstone mobile. If however Python
strips each
Am 22.01.2012 16:50, schrieb Rick Johnson:
What does Python do when presented with this code?
py> [line.strip('\n') for line in f.readlines()]
If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving a Fred flintstone mobile. If however Python
strips eac
What does Python do when presented with this code?
py> [line.strip('\n') for line in f.readlines()]
If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving a Fred flintstone mobile. If however Python
strips each line of the lines passed into readlines in
14 matches
Mail list logo