On Mon, Feb 26, 2018 at 5:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
B
On Sunday, February 25, 2018 at 10:35:29 PM UTC-6, Steven D'Aprano wrote:
[...]
> Ah, you mean just like the way things were in Python 1.0
> through 2.1? Hands up anyone who has seen an integer
> OverflowError in the last 10 years? Anyone?
I think Python2.1 is much older than 10 years, so yeah, of
On Sun, 25 Feb 2018 18:33:47 -0800, Rick Johnson wrote:
> On Friday, February 23, 2018 at 10:41:45 AM UTC-6, Steven D'Aprano
> wrote: [...]
>> There are dozens of languages that have made the design choice to limit
>> their default integers to 16- 32- or 64-bit fixed size, and let the
>> user worr
On Sunday, February 25, 2018 at 8:45:56 PM UTC-6, Chris Angelico wrote:
> On Mon, Feb 26, 2018 at 1:33 PM, Rick Johnson
> wrote:
[...]
> > A default "integer-diversity-and-inclusivity-doctrine" is
> > all fine and dandy by me, (Hey, even integers need safe spaces),
>
> In Python 3.6+, integers ha
On Sunday, February 25, 2018 at 8:45:56 PM UTC-6, Chris Angelico wrote:
> On Mon, Feb 26, 2018 at 1:33 PM, Rick Johnson
[...]
> > but i do wish we pythonistas had a method to turn off this
> > (and other) cycle burning "features" -- you know -- in the
> > 99.9 percent of time that we don'
On Friday, February 23, 2018 at 8:48:55 PM UTC-6, Steven D'Aprano wrote:
[...]
> Take the Fibonacci double-recursion benchmark. Okay, it
> tests how well your language does at making millions of
> function calls. Why?
Because making "millons of function calls" is what software
*DOES*!
Granted, an
https://docs.python.org/3.6/library/itertools.html#itertools.product
On Mon, Feb 26, 2018 at 3:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print
On Mon, Feb 26, 2018 at 1:33 PM, Rick Johnson
wrote:
> On Friday, February 23, 2018 at 10:41:45 AM UTC-6, Steven D'Aprano wrote:
> [...]
>> There are dozens of languages that have made the design
>> choice to limit their default integers to 16- 32- or 64-bit
>> fixed size, and let the user worry a
On Friday, February 23, 2018 at 10:41:45 AM UTC-6, Steven D'Aprano wrote:
[...]
> There are dozens of languages that have made the design
> choice to limit their default integers to 16- 32- or 64-bit
> fixed size, and let the user worry about overflow. Bart,
> why does it upset you so that Python m
On Sunday, February 25, 2018 at 12:19:56 PM UTC-6, arya.ku...@gmail.com wrote:
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
Hmm. Why stop there?
bit = ["kibbles"]
bits = [bit, bit
On Sun, Feb 25, 2018 at 11:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
On 2/25/2018 12:45 PM, Seb wrote:
Hello,
The following is an example of an Nx3 matrix (`uvw`) representing N
vectors that need to be multiplied by a 3x3 matrix (generated by
`randint_mat` function) and store the result in `uvw_rots`:
---
On Mon, Feb 26, 2018 at 3:57 AM, Steven D'Aprano
wrote:
> On Mon, 26 Feb 2018 01:50:16 +1100, Chris Angelico wrote:
>
>> If you actually need character-by-character, you'd need "for character
>> in fh.read()" rather than iterating over the file itself. Iterating over
>> a file yields lines.
>
> In
Why we don’t use:
for _ in _ in _
Instead of
for _ in _:
for _ in _:
Ex:
Names = ["Arya","Pupun"]
for name in Names:
for c in name:
print(c)
instead use:
for c in name in Names:
print(c)
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
The following is an example of an Nx3 matrix (`uvw`) representing N
vectors that need to be multiplied by a 3x3 matrix (generated by
`randint_mat` function) and store the result in `uvw_rots`:
------
import numpy as np
On Mon, 26 Feb 2018 01:50:16 +1100, Chris Angelico wrote:
> If you actually need character-by-character, you'd need "for character
> in fh.read()" rather than iterating over the file itself. Iterating over
> a file yields lines.
Indeed. But I wonder if there's a performance cost/gain to iterating
On Mon, Feb 26, 2018 at 12:33 AM, Chris Warrick wrote:
> On 24 February 2018 at 17:17, Peng Yu wrote:
>> Here shows some code for reading Unicode characters one by one in
>> python2. Is it the best code for reading Unicode characters one by one
>> in python2?
>>
>> https://rosettacode.org/wiki/Re
On 24 February 2018 at 17:17, Peng Yu wrote:
> Here shows some code for reading Unicode characters one by one in
> python2. Is it the best code for reading Unicode characters one by one
> in python2?
>
> https://rosettacode.org/wiki/Read_a_file_character_by_character/UTF8#Python
No, it’s terrible
18 matches
Mail list logo