Let me introduce myself.

2015-04-30 Thread Luca Menegotto
for me to notice that an NNTP newsgroup regarding Python is alive and kicking! -- Ciao! Luca Menegotto. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it a newsgroup or a list?

2015-06-07 Thread Luca Menegotto
Il 07/06/2015 13:45, Steven D'Aprano ha scritto: As far as I know, python-list a.k.a. comp.lang.python is the only one of the Python mailing lists with an official newsgroup mirror. OK. So let me rephrase: Thank God the list is mirrired to a newsgroup... -- Ciao! Luca --

Re: Function to show time to execute another function

2015-06-07 Thread Luca Menegotto
Il 07/06/2015 10:22, Cecil Westerhof ha scritto: That only times the function. I explicitly mentioned I want both the needed time AND the output. Sadly the quality of the answers on this list is going down First of all, thank God it's a newsgroup, not a list. Second, often the quality

Re: Function to show time to execute another function

2015-06-07 Thread Luca Menegotto
Il 07/06/2015 11:28, Steven D'Aprano ha scritto: But if your function takes less than, say, 1 millisecond, then your timing results are probably just meaningless random numbers, affected more by the other ten thousand processes running on your computer than by the Python code itself. That's

Re: Flan definition collision

2015-08-11 Thread Luca Menegotto
Il 11/08/2015 08:28, smahab...@google.com ha scritto: I am importing two modules, each of which is defining flags (command line arguments) with the same name. This makes it impossible to import both the modules at once, because of flag name definition conflict. If you use 'import', and

Re: variable scope of class objects

2015-10-22 Thread Luca Menegotto
Il 20/10/2015 23:33, JonRob ha scritto: Hello Luca, I very much appreciated your comments. And I understand the importance of "doing something right" (i.e. convention). This leads me to another question. Because I am interfacing with an I2C sensor I have many register definations to

Re: variable scope of class objects

2015-10-22 Thread Luca Menegotto
Maybe I've been too cryptic. I apologize. Il 22/10/2015 01:35, JonRob ha scritto: @Dennis, Thanks for your example. My structure is very similar. And that's ok. But you can also 'attach' the constants to a class, if it makes sense. For example, the same code of Dennis can be written as:

Re: variable scope of class objects

2015-10-20 Thread Luca Menegotto
Il 19/10/2015 20:39, JonRob ha scritto: I (think) I understand that in the below case, the word self could be replaced with "BME280" to explicitly call out a variable. But even still I don't know how explicit call out effects the scope of a variable. These two statements make me think you

Re: variable scope of class objects

2015-10-20 Thread Luca Menegotto
Il 20/10/2015 08:38, Nagy László Zsolt ha scritto: When you say "they have nothing to do", it is almost true but not 100%. I know it, but when it comes to eradicate an idea that comes directly from C++-like languages, you must be drastic. Nuances come after... -- Ciao! Luca --

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Luca Menegotto
Il 31/08/2015 19:48, Mahan Marwat ha scritto: If it hasn't been considered all that useful, then why > the tools like cx_freeze, pytoexe are doing very hard! Well, I consider those tools useless at all! I appreciate Python because, taken one or two precautions, I can easily port my code from

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 16:32, Heli Nix ha scritto: How can I do this in Linux ? As far as I know, in general a Linux distro comes with Python already installed. All you have to do is check if the installed version matches your needs. Tipically, you'll find Python 2.7; however, I know there are

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 18:49, Chris Angelico ha scritto: If you mean that typing "python" runs 2.7, then that's PEP 394 at work. For compatibility reasons, 'python' doesn't ever run Python 3. Please forgive me, Il make it clearer. I'm pretty shure that Ubuntu 15.04 comes with Python 2.7. I don't

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 17:05, kbtyo ha scritto: I am experimenting with many exception handling and utilizing > continue vs pass. After pouring over a lot of material on SO > and other forums I am still unclear as to the difference when > setting variables and applying functions within multiple "for" >

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 17:53, Nick Sarbicki ha scritto: Is 3.x the default on ubuntu now? My 14.10 is still 2.7. Although it does have python3 installed. I've checked my Ubuntu 15.04, and the default is 2.7.9. There is also Python3 (3.4.3), but sorry, I can't remember if I've manually installed it or

Re: Check if a given value is out of certain range

2015-09-30 Thread Luca Menegotto
Il 29/09/2015 23:04, Random832 ha scritto: How about x not in range(11)? Remember: simpler is better. -- Ciao! Luca -- https://mail.python.org/mailman/listinfo/python-list