EuroPython 2016: More than 150 sessions waiting for you

2016-03-27 Thread M.-A. Lemburg
Just in case you didn’t find enough Easter eggs today, we have a whole basket of them waiting for you: the first set of accepted sessions for EuroPython 2016 in Bilbao. *** EuroPython 2016 Session List *** https://ep2016.europython.eu/en/events/sessions/ The

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread BartC
On 27/03/2016 07:34, Paul Rubin wrote: BartC writes: But my suggestion was to have required a keyword in front of such expressions. Should there be a keyword in front of a line containing "sqrt(x)" ? What about "launch(missiles)" ? They both look like function calls.

[issue26648] csv.reader Error message indicates to use deprecated

2016-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: When this error is triggered at all? -- ___ Python tracker ___ ___

[issue26648] csv.reader Error message indicates to use deprecated

2016-03-27 Thread SilentGhost
SilentGhost added the comment: Ah, the bit about csv module doing it's own newline handling is what I missed. Here is the updated patch. -- Added file: http://bugs.python.org/file42306/issue26648_2.diff ___ Python tracker

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-27 Thread Martin Panter
Martin Panter added the comment: I think this version is pretty good. I would move the signal restoring bit to the end of the handler (see review), and there is some funny indentation, but I can fix that up when I commit it. -- ___ Python tracker

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

Re: repeat items in a list

2016-03-27 Thread Jussi Piitulainen
Antonio Caminero Garcia writes: > 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): >>

[issue26648] csv.reader Error message indicates to use deprecated

2016-03-27 Thread Martin Panter
Martin Panter added the comment: Isn’t using newline=None a way to produce the error in the first place? Silent Ghost: see the footnote . Reading with newline=None translates newlines. Writing with newline=None produces CRLFs on Windows. I

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset af92651c22e9 by Martin Panter in branch '3.5': Issue #26644: Raise ValueError for negative SSLSocket.recv() and read() https://hg.python.org/cpython/rev/af92651c22e9 New changeset b84d136e0028 by Martin Panter in branch '2.7': Issue #26644: Raise

[issue26650] calendar: OverflowErrors for year == 1 and firstweekday > 0

2016-03-27 Thread SilentGhost
SilentGhost added the comment: Here is the patch. Both this patch and the fix for #15421 might violate the documented behaviour of getting the full week's worth of dates. I wonder if that should also be documented. -- keywords: +patch nosy: +SilentGhost, rhettinger stage: -> patch

Re: Threading is foobared?

2016-03-27 Thread Tim Golden
On 27/03/2016 07:25, Random832 wrote: On Sat, Mar 26, 2016, at 23:18, Ben Finney wrote: What you've demonstrated is that at least one host is violating communication standards by altering existing reference fields on messages in transit. The usenet gateway relays posts that originated on the

Re: repeat items in a list

2016-03-27 Thread larudwer
how about sorted(["a", "b"]*3) ['a', 'a', 'a', 'b', 'b', 'b'] -- https://mail.python.org/mailman/listinfo/python-list

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Oscar Benjamin
On 27 Mar 2016 10:56, "Steven D'Aprano" wrote: > > > My C is a bit rusty, so excuse me if I get the syntax wrong. I have a > function: > > void foo(int n) { > int i = n + 1; > bar(i); > } > > There's a possible overflow of a signed int in there. This is undefined >

[issue26650] calendar: OverflowErrors for year == 1 and firstweekday > 0

2016-03-27 Thread Martijn Pieters
New submission from Martijn Pieters: For anything other than calendar.Calendar(0), many methods lead to OverflowError exceptions: >>> import calendar >>> c = calendar.Calendar(0) >>> list(c.itermonthdays(1, 1)) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,

[issue26649] Fail update installation: 'utf-8' codec can't decode

2016-03-27 Thread STINNER Victor
STINNER Victor added the comment: I din't know gns3 but it looks like a bug in gns3. You should report the bug there. You can use faulthandler to get the Python traceback. -- ___ Python tracker

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","b"] > > nrep = 3 > > print xx > > yy = [] > >

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-27 Thread Alexey Muranov
Alexey Muranov added the comment: My grep man page says --help Print a brief help message. but indeed there is no `--help` in usage message. Maybe this is a bug of the man page. Thanks for the explanation. -- ___ Python tracker

[issue26649] Fail update installation: 'utf-8' codec can't decode

2016-03-27 Thread SilentGhost
Changes by SilentGhost : -- components: +Unicode nosy: +ezio.melotti, haypo type: -> behavior ___ Python tracker ___

[issue26648] csv.reader Error message indicates to use deprecated

2016-03-27 Thread SilentGhost
SilentGhost added the comment: While the 'U' mode has been deprecated it doesn't mean that your example doesn't run in 3.5 - it runs just fine and will keep doing so until 4.0 I'm attaching patch that suggests using newline=None (even though it's a default value for open), as that what seems

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: >

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Rustom Mody
On Sunday, March 27, 2016 at 1:10:51 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 27 Mar 2016 05:13 pm, Paul Rubin wrote: > > > No it's not meaningless if it "might" overflow, it's meaningless if it > > -does- overflow, > > No! That's exactly wrong! > > Paul, thank you for inadvertently

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Steven D'Aprano
On Sun, 27 Mar 2016 01:30 am, Chris Angelico wrote: > On Sun, Mar 27, 2016 at 1:09 AM, BartC wrote: >> I'm surprised that both C and Python allow statements that apparently do >> nothing. In both, an example is: >> >> x >> >> on a line by itself. This expression is evaluated,

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Steven D'Aprano
On Sun, 27 Mar 2016 05:13 pm, Paul Rubin wrote: > Steven D'Aprano writes: >> For example, would you consider that this isolated C code is >> "meaningless"? >> int i = n + 1; > > It's meaningful as long as n is in a certain range of values so there's > no overflow. > >> But

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Steven D'Aprano
On Sat, 26 Mar 2016 08:23 am, Chris Angelico wrote: > On Sat, Mar 26, 2016 at 2:50 AM, Steven D'Aprano > wrote: >> Undefined behaviour does not mean "implementation specific behaviour". >> Nor does it mean "something sensible will happen but we don't promise >> what it will

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Rustom Mody
On Sunday, March 27, 2016 at 12:05:01 PM UTC+5:30, Paul Rubin wrote: > Rustom Mody writes: > > eg haskell (ghc) is written in ghc > > Where did the first bootstrap start from? > > The very earliest Haskell implementation was written in Lisp. Ummm So you found a little chink in my argument -- Ok

[issue26647] Wordcode

2016-03-27 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, yselivanov ___ Python tracker ___

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Paul Rubin
Rustom Mody writes: > eg haskell (ghc) is written in ghc > Where did the first bootstrap start from? The very earliest Haskell implementation was written in Lisp. -- https://mail.python.org/mailman/listinfo/python-list

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Paul Rubin
BartC writes: > But my suggestion was to have required a keyword in front of > such expressions. Should there be a keyword in front of a line containing "sqrt(x)" ? What about "launch(missiles)" ? The compiler can't tell which of those expressions has a side effect. The first

Re: help with program

2016-03-27 Thread Terry Reedy
On 3/26/2016 6:48 PM, Chris Angelico wrote: On Sun, Mar 27, 2016 at 7:38 AM, Jerry Martens wrote: hi im trying to run this program and it opens a screen really ast and closes it faster withou any results. There are a few ways you could do this. One is to run it from

Re: Threading is foobared?

2016-03-27 Thread Random832
On Sat, Mar 26, 2016, at 23:18, Ben Finney wrote: > What you've demonstrated is that at least one host is violating > communication standards by altering existing reference fields on > messages in transit. The usenet gateway relays posts that originated on the mailing list to usenet with their

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-27 Thread Paul Rubin
Steven D'Aprano writes: > For example, would you consider that this isolated C code is > "meaningless"? > int i = n + 1; It's meaningful as long as n is in a certain range of values so there's no overflow. > But according to the standard, it's "meaningless", since it might

<    1   2