Re: Tkinter widgets into classes.

2014-02-02 Thread Christian Gollwitzer
Am 01.02.14 20:43, schrieb Lewis Wood: I was wandering if I could dynamically change my GUI and after a few searches on Google found the grid_remove() function. What I'm wandering now is if there is a way to group a lot of widgets up into one, and then use the one grid_remove function which

Re: Tkinter widgets into classes.

2014-02-02 Thread Christian Gollwitzer
Am 02.02.14 00:07, schrieb Lewis Wood: It does, this is the whole code: from tkinter import * root=Tk() root.title(Second Root Testing) def secondwindow(): root2=Tk() root2.mainloop() button1=Button(root,text=Root2,command=secondwindow).grid(row=0,column=0) root.mainloop() I

Re: generator slides review

2014-02-02 Thread andrea crotti
2014-02-02 Terry Reedy tjre...@udel.edu: On 2/1/2014 9:12 AM, andrea crotti wrote: Comments: The use is assert in the first slide seem bad in a couple of different respects. Why is it bad? It's probably not necessary but since we ask for a range it might be good to check if the range is

Re: generator slides review

2014-02-02 Thread andrea crotti
2014-02-01 Miki Tebeka miki.teb...@gmail.com: My 2 cents: slide 4: [i*2 for i in range(10)] Well this is not correct in theory because the end should be the max number, not the number of elements. So it should be [i*2 for i in range(10/2)] which might be fine but it's not really more clear

Re: generator slides review

2014-02-02 Thread andrea crotti
The slides are updated now 2014-02-02 andrea crotti andrea.crott...@gmail.com: 2014-02-01 Miki Tebeka miki.teb...@gmail.com: My 2 cents: slide 4: [i*2 for i in range(10)] Well this is not correct in theory because the end should be the max number, not the number of elements. So it

Re: generator slides review

2014-02-02 Thread andrea crotti
Sorry left too early, the slides are updated with the fixes suggested, thanks everyone. https://dl.dropboxusercontent.com/u/3183120/talks/generators/index.html#1 For me the biggest problem is still: - to find some more interesting example that is easy enough to explain - to find a better order in

Re: generator slides review

2014-02-02 Thread Peter Otten
andrea crotti wrote: 2014-02-01 Miki Tebeka miki.teb...@gmail.com: My 2 cents: slide 21: from itertools import count, ifilterfalse def divided_by(p): return lambda n: n % p == 0 def primes(): nums = count(2) while True: p = next(nums) yield p

Re: mapping objects

2014-02-02 Thread Rita
Thanks for the response Cameron. No amount of 'googling' could provide me with that caliber response :-) So, it seems regardless I would need a database. On Sun, Feb 2, 2014 at 1:58 AM, Cameron Simpson c...@zip.com.au wrote: On 01Feb2014 20:46, Rita rmorgan...@gmail.com wrote: I want to

Re: pytz question: GMT vs. UTC

2014-02-02 Thread Pete Forman
Grant Edwards invalid@invalid.invalid writes: On 2014-01-30, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote: The temperature unit is the Kelvin, not the Degree Kelvin. One writes: 0 K, 275.15 K And remember to say Kelvins not Kelvin when speaking about temperatures other than 1 K. And

Re: pytz question: GMT vs. UTC

2014-02-02 Thread wxjmfauth
Le dimanche 2 février 2014 13:45:54 UTC+1, Pete Forman a écrit : Grant Edwards invalid@invalid.invalid writes: On 2014-01-30, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote: The temperature unit is the Kelvin, not the Degree Kelvin. One writes: 0 K, 275.15 K And

Re: generator slides review

2014-02-02 Thread Miki Tebeka
Thank you that's nicer, but ifiilterfalse is not in Python 3 (could use filter of course). It was renamed to filterfalse - http://docs.python.org/3.3/library/itertools.html#itertools.filterfalse -- https://mail.python.org/mailman/listinfo/python-list

Unable to Launch Python 2.7 after Windows 8.1 Update

2014-02-02 Thread Allison Gray
I recently obtained a new laptop with Windows 8.1 and installed Python 2.7. Everything was working fine. Then after my first update, I was unable to launch Python. After clicking the Python icon, the thinking cursor activated, but Python never opened. I restored my laptop to a time before the

Re: pytz question: GMT vs. UTC

2014-02-02 Thread Grant Edwards
On 2014-02-02, Pete Forman petef4+use...@gmail.com wrote: Grant Edwards invalid@invalid.invalid writes: On 2014-01-30, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote: The temperature unit is the Kelvin, not the Degree Kelvin. One writes: 0 K, 275.15 K And remember to say Kelvins not Kelvin

Re: Help with some python homework...

2014-02-02 Thread David Hutto
price_per_book = 24.95 discount = .40 quantity = 60 Here: discounted_price = (1-discount) * price_per_book The discounted price should be price_per_book - discount shipping = 3.0 + (60 - 1) * .75 shipping should be, I think, should be 3.0 + (quantity * .75) total_price = 60 * discounted_price

Re: Unable to Launch Python 2.7 after Windows 8.1 Update

2014-02-02 Thread MRAB
On 2014-02-02 15:39, Allison Gray wrote: I recently obtained a new laptop with Windows 8.1 and installed Python 2.7. Everything was working fine. Then after my first update, I was unable to launch Python. After clicking the Python icon, the thinking cursor activated, but Python never opened. I

Re: Help with some python homework...

2014-02-02 Thread MRAB
On 2014-02-02 16:11, David Hutto wrote: price_per_book = 24.95 discount = .40 quantity = 60 The original problem says: Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3 for the first copy and 75 cents for each additional copy. What is the total

Re: Help with some python homework...

2014-02-02 Thread David Hutto
On Sunday, February 2, 2014 11:11:07 AM UTC-5, David Hutto wrote: price_per_book = 24.95 discount = .40 quantity = 60 Here: discounted_price = (1-discount) * price_per_book The discounted price should be price_per_book - discount shipping = 3.0 + (60 - 1) * .75

Re: Help with some python homework...

2014-02-02 Thread David Hutto
On Sunday, February 2, 2014 11:38:57 AM UTC-5, MRAB wrote: On 2014-02-02 16:11, David Hutto wrote: price_per_book = 24.95 discount = .40 quantity = 60 The original problem says: Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping

Re: Help with some python homework...

2014-02-02 Thread Rhodri James
On Sat, 01 Feb 2014 05:18:34 -, Scott W Dunning swdunn...@cox.net wrote: Any chance you guys could help with another question I have? Below is a code to a different problem. The only thing I don’t understand is why when calculating the 'discounted price’ you have to subtract 1?

Re: Help with some python homework...

2014-02-02 Thread Denis McMahon
On Sun, 02 Feb 2014 08:57:03 -0800, David Hutto wrote: Revised: discounted_price = price_per_book - (price_per_book * percent_discount) by applying some simple algebra to the right hand side price_per_book - (price_per_book * percent_discount) x = (x * 1) so price_per_book ==

[newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Jean Dupont
I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 2 . . 2 2 2 2 2 2 As you can see the rows are always twice the size of the

Project survey

2014-02-02 Thread Ashik Bekal
Help us improve our app by completing this simple survey... https://docs.google.com/forms/d/164j4anIdefOF7yhuRWIi3IF2EW_Vmippy4lLtxUhj68/viewform -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Roy Smith
In article 515e582f-ed17-4d4e-9872-f07f1fda6...@googlegroups.com, Jean Dupont jeandupont...@gmail.com wrote: I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0

Re: Help with some python homework...

2014-02-02 Thread David Hutto
On Sunday, February 2, 2014 12:43:01 PM UTC-5, Denis McMahon wrote: On Sun, 02 Feb 2014 08:57:03 -0800, David Hutto wrote: Revised: discounted_price = price_per_book - (price_per_book * percent_discount) by applying some simple algebra to the right hand side

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Peter Otten
Jean Dupont wrote: I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 2 . . 2 2 2 2 2 2 As you can

Re: Python (windows)packet sniffer ARP

2014-02-02 Thread Asaf Las
On Friday, January 31, 2014 9:10:28 AM UTC+2, Ralle wrote: Hello I am wondering if it possible to create a packet sniffer in windows using python that only sniffs for ARP packets. In addition to Mark Betz suggestion - http://www.wireshark.org/ it works above winpcap and it is full

Re: Help with some python homework...

2014-02-02 Thread David Hutto
Or a better iterating example for a database of shipping, or ordering books would be: import random as r def order_total(price_per_book,percent_discount_amount,quantity,first_book_shipping,extra_book_shipping): percent_discount = price_per_book * percent_discount_amount

Re: Help with some python homework...

2014-02-02 Thread David Hutto
Should have been the following, which just shows the books price as a float as well, but you get the point by now, I'm sure: import random as r def order_total(price_per_book,percent_discount_amount,quantity,first_book_shipping,extra_book_shipping): percent_discount = price_per_book *

Re: Tkinter widgets into classes.

2014-02-02 Thread Lewis Wood
Thanks all who replied, will look further into megawidgets and the Toplevel() function. Is there a way to get a separate window to return something when closed? -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Jean Dupont
Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: Jean Dupont wrote: I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Re: Unable to Launch Python 2.7 after Windows 8.1 Update

2014-02-02 Thread John Gordon
In c3a0106c-db91-4854-907b-aa66d1d71...@googlegroups.com Allison Gray allison.k.g...@gmail.com writes: I recently obtained a new laptop with Windows 8.1 and installed Python 2.7.= Everything was working fine. Then after my first update, I was unable to l= aunch Python. After clicking the

Calculator Problem

2014-02-02 Thread Charlie Winn
Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:'))

Re: Unable to Launch Python 2.7 after Windows 8.1 Update

2014-02-02 Thread Allison Gray
I would've suggested re-installing Python. That would've been worth trying. Unfortunately, I did uninstall and re-install Python. It didn't help. -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculator Problem

2014-02-02 Thread Alister
On Sun, 02 Feb 2014 13:16:44 -0800, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 =

Re: Calculator Problem

2014-02-02 Thread Gary Herron
On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First

Re: Calculator Problem

2014-02-02 Thread Denis McMahon
On Sun, 02 Feb 2014 13:46:24 -0800, Gary Herron wrote: Sorry, but in fact you did *not* run this program as you claim. +1 I can also see a call to a function named Question, but I can't see where that function is defined. That might not be a major issue, because I don't think the while

Re: generator slides review

2014-02-02 Thread andrea crotti
Thanks everyone for your feedback. The talk I think went well, maybe I was too fast because I only used 21 minutes. From the audience feedback, there were some questions about my Buggy code example, so yes probably it's not a good example since it's too artificial. I'll have to find something

Re: mapping objects

2014-02-02 Thread Cameron Simpson
On 02Feb2014 07:41, Rita rmorgan...@gmail.com wrote: Thanks for the response Cameron. No amount of 'googling' could provide me with that caliber response :-) So, it seems regardless I would need a database. To use SQLA, yes. The SQLite backend is a very cheap/easy way to start; local files,

Re: __init__ is the initialiser

2014-02-02 Thread Gregory Ewing
Roy Smith wrote: In article 52ec84bc$0$29972$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: A dubious analogy, since there are artists who would say that attacking the canvas with a knife and setting the remains on fire count as a form of

Re: __init__ is the initialiser

2014-02-02 Thread Gregory Ewing
Mark Lawrence wrote: Called when the instance is created. The arguments are those passed to the class constructor expression. If a base class has an __init__() method, the derived class’s __init__() method, if any, must explicitly call it to ensure proper initialization of the base class part

Re: __init__ is the initialiser

2014-02-02 Thread Chris Angelico
On Mon, Feb 3, 2014 at 10:15 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Roy Smith wrote: In article 52ec84bc$0$29972$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: A dubious analogy, since there are artists who would say that

Re: __init__ is the initialiser

2014-02-02 Thread Roy Smith
In article bl82apfh3s...@mid.individual.net, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Generally I think it would be better to talk about the __new__ method and the __init__ method, and not call either of them a constructor. +1 -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-02-02 Thread Gregory Ewing
Steven D'Aprano wrote: (In hindsight, it was probably a mistake for Python to define two create- an-object methods, although I expect it was deemed necessary for historical reasons. I'm not sure that all of the reasons are historical. Languages that have a single creation/initialisation

Re: __init__ is the initialiser

2014-02-02 Thread Roy Smith
In article mailman.6313.1391383680.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: What you see here is proof that Python really does need an explicit destroy() function. It would need to recycle the object [1], forcing all references to it to dangle: a = object() b

Concepts and Applications of Finite Element Analysis (4th Ed., Cook, Malkus, Plesha Witt)

2014-02-02 Thread kalvinmanual3
I have solutions manuals to all problems and exercises in these textbooks. To get one in an electronic format contact me at: kalvinmanual(at)gmail(dot)com and let me know its title, author and edition. Please this service is NOT free. SOLUTIONS MANUAL TO Chemical and Engineering Thermodynamics

Re: __init__ is the initialiser

2014-02-02 Thread Tim Delaney
On 1 February 2014 14:42, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 31 Jan 2014 14:52:15 -0500, Ned Batchelder wrote: (In hindsight, it was probably a mistake for Python to define two create- an-object methods, although I expect it was deemed necessary for

Re: __init__ is the initialiser

2014-02-02 Thread Chris Angelico
On Mon, Feb 3, 2014 at 10:40 AM, Roy Smith r...@panix.com wrote: I'm reasonably sure you posted this as humor, but there is some truth in what you said. In the crypto/security domain, you often want to keep a key or cleartext around only for the time it's needed, and scrub the memory it was

Re: __init__ is the initialiser

2014-02-02 Thread Dave Angel
Chris Angelico ros...@gmail.com Wrote in message: [1] Scrub the RAM clean and return it to the computer, put the 1 bits onto the stack for subsequent reuse, and throw all the useless 0 bits out onto the heap. But don't you realize, we have to keep the zero bits around, so the one

Re: __init__ is the initialiser

2014-02-02 Thread Steven D'Aprano
On Mon, 03 Feb 2014 12:38:00 +1300, Gregory Ewing wrote: Steven D'Aprano wrote: (In hindsight, it was probably a mistake for Python to define two create- an-object methods, although I expect it was deemed necessary for historical reasons. I'm not sure that all of the reasons are

Re: __init__ is the initialiser

2014-02-02 Thread Roy Smith
In article mailman.6316.1391387539.18130.python-l...@python.org, Dave Angel da...@davea.name wrote: Chris Angelico ros...@gmail.com Wrote in message: [1] Scrub the RAM clean and return it to the computer, put the 1 bits onto the stack for subsequent reuse, and throw all the useless 0

Re: Python (windows)packet sniffer ARP

2014-02-02 Thread Asaf Las
On Sunday, February 2, 2014 8:26:05 PM UTC+2, Asaf Las wrote: On Friday, January 31, 2014 9:10:28 AM UTC+2, Ralle wrote: Hello I am wondering if it possible to create a packet sniffer in windows using python that only sniffs for ARP packets. There is also example on bottom of socket

bw2ui installation failure

2014-02-02 Thread e-letter
Readers, Firstly, sorry for the cross-post: https://groups.google.com/d/topic/brightway2/-akB-OQBZi4 Any advice about forcing installation of a later version of a software please? -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with some python homework...

2014-02-02 Thread David Hutto
On Saturday, February 1, 2014 2:32:22 PM UTC-5, Denis McMahon wrote: On Fri, 31 Jan 2014 18:14:31 -0700, Scott W Dunning wrote: little different from a few things you guys had mentioned. For one, I got the correct time by calculating the number of time run and converting that

Re: bw2ui installation failure

2014-02-02 Thread Asaf Las
On Sunday, February 2, 2014 9:20:32 PM UTC+2, e-letter wrote: Readers, Firstly, sorry for the cross-post: https://groups.google.com/d/topic/brightway2/-akB-OQBZi4 Any advice about forcing installation of a later version of a software please? for pip it is: pip install --upgrade module_name

Re: __init__ is the initialiser

2014-02-02 Thread Devin Jeanpierre
On Sun, Feb 2, 2014 at 4:07 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Feb 3, 2014 at 10:40 AM, Roy Smith r...@panix.com wrote: I'm reasonably sure you posted this as humor, but there is some truth in what you said. In the crypto/security domain, you often want to keep a key or

Re: __init__ is the initialiser

2014-02-02 Thread Chris Angelico
On Mon, Feb 3, 2014 at 12:24 PM, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Sun, Feb 2, 2014 at 4:07 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Feb 3, 2014 at 10:40 AM, Roy Smith r...@panix.com wrote: I'm reasonably sure you posted this as humor, but there is some truth in what

Re: __init__ is the initialiser

2014-02-02 Thread Devin Jeanpierre
On Sun, Feb 2, 2014 at 5:37 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Feb 3, 2014 at 12:24 PM, Devin Jeanpierre Destroying memory is comparatively easy, as you say -- just make the object's internal state invalid, rather than adding anything to the language. Yeah. Works fine if you

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Asaf Las
On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: I'm looking for an efficient method to produce rows of tables like this: jean you can also try to make below universal for all needed bases: m = lambda m, n: 1

Python 3.3 and Pygame 19.2a install problems

2014-02-02 Thread edvogel56
Hi, I am putting together tutorials to accompany Invent Your Own Computer Games with Python for a volunteer gig. I installed Python 3.3 and Pygame 19.2a on an XP machine and it works fine. However the install on my Win7 (Home Edition)HP notebook is not working. While running python code

Re: Python declarative

2014-02-02 Thread Asaf Las
On Sunday, January 26, 2014 4:45:59 AM UTC+2, Mark Lawrence wrote: On 26/01/2014 02:33, Steven D'Aprano wrote: If I worked as a consultant I'd much prefer the XML version as I'd be able to charge much more on the grounds that I'd done much more, hoping that the people paying didn't bother

Re:Python 3.3 and Pygame 19.2a install problems

2014-02-02 Thread Dave Angel
edvoge...@gmail.com Wrote in message: That being said there is a base.pyd file but not a base.dll. I understand .pyd files are a type of dll. Could there be something about Win7 doesn't like about that naming convention? Please advise. I highly doubt that. Most Windows dlls have

Re: Python 3.3 and Pygame 19.2a install problems

2014-02-02 Thread edvogel56
On Sunday, February 2, 2014 8:06:11 PM UTC-6, edvo...@gmail.com wrote: Hi, I am putting together tutorials to accompany Invent Your Own Computer Games with Python for a volunteer gig. I installed Python 3.3 and Pygame 19.2a on an XP machine and it works fine. However the install on my

Re: __init__ is the initialiser

2014-02-02 Thread Dave Angel
Roy Smith r...@panix.com Wrote in message: In article mailman.6316.1391387539.18130.python-l...@python.org, Dave Angel da...@davea.name wrote: Chris Angelico ros...@gmail.com Wrote in message: [1] Scrub the RAM clean and return it to the computer, put the 1 bits onto the stack

Re: __init__ is the initialiser

2014-02-02 Thread Skip Montanaro
On Sun, Feb 2, 2014 at 9:14 PM, Dave Angel da...@davea.name wrote: And when the q-bits get entangled up, we won't know the question till after the answer has collapsed. Won't looking at the answer change it? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter widgets into classes.

2014-02-02 Thread David Hutto
I just happened to find this link: http://effbot.org/tkinterbook/ through this link: https://wiki.python.org/moin/TkInter which ALL happened to stem from this link: https://www.google.com/search?client=ubuntuchannel=fsq=python+tkinter+tutorialsie=utf-8oe=utf-8 On Sun, Feb 2, 2014 at 3:38

Re: __init__ is the initialiser

2014-02-02 Thread Dave Angel
Skip Montanaro s...@pobox.com Wrote in message: On Sun, Feb 2, 2014 at 9:14 PM, Dave Angel da...@davea.name wrote: And when the q-bits get entangled up, we won't know the question till after the answer has collapsed. Won't looking at the answer change it? No, looking at it is what

Re: __init__ is the initialiser

2014-02-02 Thread Roy Smith
In article mailman.6325.1391403799.18130.python-l...@python.org, Dave Angel da...@davea.name wrote: Skip Montanaro s...@pobox.com Wrote in message: On Sun, Feb 2, 2014 at 9:14 PM, Dave Angel da...@davea.name wrote: And when the q-bits get entangled up, we won't know the question till

Re: __init__ is the initialiser

2014-02-02 Thread Chris Angelico
On Mon, Feb 3, 2014 at 4:12 PM, Roy Smith r...@panix.com wrote: So, what you're saying is when I delete an object, __del__() has both been called and not been called? class Schrodinger: def __init__(self): print(Init!) print(Schrodinger()) Init! __main__.Schrodinger object at

Re: __init__ is the initialiser

2014-02-02 Thread Ethan Furman
On 02/02/2014 09:12 PM, Roy Smith wrote: In article mailman.6325.1391403799.18130.python-l...@python.org, Dave Angel da...@davea.name wrote: Skip Montanaro s...@pobox.com Wrote in message: On Sun, Feb 2, 2014 at 9:14 PM, Dave Angel da...@davea.name wrote: And when the q-bits get

Re: Python 3.3 and Pygame 19.2a install problems

2014-02-02 Thread Terry Reedy
On 2/2/2014 10:04 PM, edvoge...@gmail.com wrote: Traceback (most recent call last): File C:\Users\Ed\Documents\SOMA\Minecraft and Python\inventwithpython_src\dodger.py, line 1, in module import pygame, random, sys File C:\Python33\lib\site-packages\pygame\__init__.py, line 95, in module

Re: generator slides review

2014-02-02 Thread Terry Reedy
On 2/2/2014 5:40 AM, andrea crotti wrote: 2014-02-02 Terry Reedy tjre...@udel.edu: On 2/1/2014 9:12 AM, andrea crotti wrote: Comments: The use is assert in the first slide seem bad in a couple of different respects. Why is it bad? It's probably not necessary but since we ask for a range it

Re: Help with some python homework...

2014-02-02 Thread Larry Hudson
On 02/02/2014 05:12 PM, David Hutto wrote: snip A little OT, but these might peak your interest for this: Also a little OT, but the word you're looking for is spelled pique. ;-) (Although, it IS pronounced 'peak'.) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

[issue8743] set() operators don't work with collections.Set instances

2014-02-02 Thread Nick Coghlan
Nick Coghlan added the comment: I updated the patch to apply cleanly to the default branch. I also added several new test cases which uncovered issues with Daniel's previous patch. Specifically: - the reverse functions were not be tested properly (added a separate test to ensure they all

[issue2226] Small _abcoll Bugs / Oddities

2014-02-02 Thread Nick Coghlan
Nick Coghlan added the comment: With the only remaining issue here being the misbehaviour of the Set and MutableSet ABCs when dealing with other types (the other issues in Armin's original report were much simpler and fixed promptly), I'm closing this as a duplicate of issue 8743 (where I

[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-02 Thread STINNER Victor
STINNER Victor added the comment: time.monotonic() has a bad resolution (15.6 ms) on Windows. To measure performances, use time.perf_counter() or time.process_time() as proposed in tome.clock() documentation. It depends if you want to include time elapsed during sleep. Usually

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'd prefer to leave the trailing dots. It's the technically correct thing to do. And as they say, technically correct is the best kind of correct! -- title: Add ipaddress property to get name of reverse DNS pointer - Add ipaddress property to get name

[issue8743] set() operators don't work with collections.Set instances

2014-02-02 Thread Nick Coghlan
Nick Coghlan added the comment: I initially missed Mark's suggestion above to avoid the recursive subtraction operation in __rsub__. v2 of my patch includes that tweak. -- Added file: http://bugs.python.org/file33864/issue8743-set-ABC-interoperability_v2.diff

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The patch looks good to me, save for a versionadded tag in the docs. I've mentioned it on Rietveld. Not to get in to bikeshedding on the name, but I'd prefer something with PTR in the name. I'm an old-timer, and think of these as PTR lookups (because they

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: Or, now that I think about it some more, maybe leave the name as reverse_pointer and just mention PTR records in the documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20480

[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I read the manual more carefully and noticed that the guarantee is that tokenizing the result of untokenize matches the input to untokenize. The result is guaranteed to tokenize back to match the input so that the conversion is lossless and round-trips are

[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the problem is with untokenize. s =bif False:\n\tx=3\n\ty=3\n t = tokenize(io.BytesIO(s).readline) for i in t: print(i) produces a token stream that seems correct. TokenInfo(type=56 (ENCODING), string='utf-8', start=(0, 0), end=(0, 0), line='')

[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-02 Thread Larry Hastings
Larry Hastings added the comment: In case a little background would help: while developing support for '__text_signature__' I had to move the test and the from_builtin() call to the top. It used to be more in the middle-ish. I don't have notes specifically on why I moved it, but I dimly

[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The untokenize docstring has a stronger guarantee, and in the direction you were claiming. Round-trip invariant for full input: Untokenized source will match input source exactly. For this to be true, the indent strings must be saved and not replaced by

[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-02 Thread Stefan Behnel
Stefan Behnel added the comment: I assumed that anything that had a __text_signature__ wasn't going to have any other kind of signature information. Therefore, if the object had a __text_signature__ attribute, then I already knew that's the best approach and it should definitely be first.

[issue18577] lru_cache enhancement: lru_timestamp helper function

2014-02-02 Thread Peter Santoro
Peter Santoro added the comment: As requested, I published this for review on http://code.activestate.com/recipes/578817-lru_timestamp-cache-entry-aging-for-functoolslru_c/ -- ___ Python tracker rep...@bugs.python.org

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The _PyCodec_GetIncrementalDecoder name looks too similar to PyCodec_IncrementalDecoder. It would be better to use more different name. And please note my minor comments on Rietveld. -- ___ Python tracker

[issue2008] cookielib lacks FileCookieJar class for Safari

2014-02-02 Thread Hendrik
Hendrik added the comment: Ok, i've got it. --- a/Lib/http/cookiejar.py Wed Dec 18 15:37:03 2013 -0600 +++ b/Lib/http/cookiejar.py Sat Feb 01 15:12:01 2014 +0100 @@ -11,17 +11,17 @@ distributed with the Python standard library, but are available from http://wwwsearch.sf.net/): -

[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-02 Thread Stefan Behnel
Stefan Behnel added the comment: Ok, I think I figured it out now. Essentially, Cython's functions type, despite starting with the same struct layout as PyCFunction, must not visibly inherit from PyCFunction. Consequently, inspect.isbuiltin() returns False, as does inspect.isfunction() -

[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2014-02-02 Thread Steven D'Aprano
Changes by Steven D'Aprano steve+pyt...@pearwood.info: -- assignee: - stevenjd nosy: +stevenjd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20389 ___

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2014-02-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: Off the top of my head, I can think of three APIs: (1) separate functions, as Nick suggests: mean vs weighted_mean, stdev vs weighted_stdev (2) treat mappings as an implied (value, frequency) pairs (3) take an additional argument to switch between unweighted

[issue20478] Avoid inadvertently special casing Counter in statistics module

2014-02-02 Thread Steven D'Aprano
Changes by Steven D'Aprano steve+pyt...@pearwood.info: -- assignee: - stevenjd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20478 ___ ___

[issue20481] Clarify type coercion rules in statistics module

2014-02-02 Thread Steven D'Aprano
Changes by Steven D'Aprano steve+pyt...@pearwood.info: -- assignee: - stevenjd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20481 ___ ___

[issue19654] test_tkinter sporadic skipped on x86 Tiger 3.x buildbot

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The mystery remains why test_tk appears to alternately pass and fail on this buildbot. I don't see why it doesn't always fail. test_tk not fails in case when it is just skipped. And why it is sporadic skipped, this is very interesting question.

[issue2008] cookielib lacks FileCookieJar class for Safari

2014-02-02 Thread Hendrik
Changes by Hendrik hendrik.hoe...@googlemail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2008 ___ ___

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2014-02-02 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 2 February 2014 11:55, Steven D'Aprano rep...@bugs.python.org wrote: (1) separate functions, as Nick suggests: mean vs weighted_mean, stdev vs weighted_stdev This would be my preferred approach. It makes it very clear which functions are available for

[issue20481] Clarify type coercion rules in statistics module

2014-02-02 Thread Oscar Benjamin
Oscar Benjamin added the comment: Wolfgang have you tested this with any third party numeric types from sympy, gmpy2, mpmath etc.? Last I checked no third party types implement the numbers ABCs e.g.: import sympy, numbers r = sympy.Rational(1, 2) r 1/2 isinstance(r, numbers.Rational) False

[issue20453] json.load() error message changed in 3.4

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No JSON object could be decoded, expecting value is too expensive and second part of this message just repeat first part. The message can be shortened to No JSON object could be decoded. But this is not fully correct. JSON term object corresponds to Python

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd prefer to leave the trailing dots. It's the technically correct thing to do. It depends what we're talking about. Hostnames (in the general sense) don't carry a trailing dot except in DNS queries. So I'd argue the trailing dot is more part of the DNS

[issue20453] json.load() error message changed in 3.4

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: To me new error messages look more informative and more correct. Yes, I agree with you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20453 ___

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Leon Weber
Leon Weber added the comment: I’ve changed the wording in the documentation a bit and added an explanatory sentence, how about this? I think this should make pretty clear what it does and does not, and also easy to find in the documentation when searching for “reverse”, “PTR” and “pointer”

  1   2   3   >