Install Python 2.4 on Fedora 3 Core

2005-01-17 Thread Bill
I have less than a week experience on linux, so I am a new newbie. Python 2.3 came preinstalled. I installed version 2.4. All seemed to go well except it installed to usr/local? 1. Was it wrong to install when logged in as 'root'? Does it make a difference? 2. I looked in the package editor

Re: How to get started in GUI Programming?

2005-11-25 Thread Bill
accompanying Boa Constructor (http://boa-constructor.sourceforge.net/) to be a good start at creating a wxWidgets GUI. Bill -- http://mail.python.org/mailman/listinfo/python-list

The limitation of the Photon Hypothesis

2004-12-22 Thread bill
The limitation of the Photon Hypothesis According to the electromagnetic theory of light, its energy is related to the amplitude of the electric field of the electromagnetic wave, W=eE^2V(where E is the amplitude and V is the volume). It apparently has nothing to do with the light's

The limitation of the Photon Hypothesis

2005-01-07 Thread bill
Please reply to [EMAIL PROTECTED], thank you ! The limitation of the Photon Hypothesis According to the electromagnetic theory of light, its energy is related to the amplitude of the electric field of the electromagnetic wave, W=eE^2V(where E is the amplitude and V is the volume). It

CherryPy wiki not working

2005-12-15 Thread bill
Has the CherryPy wiki been hacked ?. All pages seem to be re-directed to some form of Amazon page. Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: CherryPy wiki not working

2005-12-16 Thread bill
Still, not a Python problem. Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: Visual Python : finished ?

2005-12-16 Thread Bill
Do Re Mi chel La Si Do wrote: Hi! See : http://www.activeperl.com/Products/Visual_Perl/?mp=1 @+ MCI Another closed source success story. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyQt for windows

2005-12-23 Thread Bill
relativity wrote: I have downloaded and installed pyQt 3.14 educational but when I run any of the examples I get an error saying qt-mtedu333.dll was not found. I have also installed the qt4 opensource version for windows but I am not sure everything was set up correctly. When I run configure

ISO authoritative Python ref

2005-06-17 Thread bill
I have to learn Python in a hurry. I learn fastest by reading the specs/reference manual, or something like it (e.g. C: A Reference Manual, by Harbison and Steel). Is there a Python book that fits this description? Many thanks in advance, bill P.S. I avoid tutorials like the plague, and I

Re: ISO authoritative Python ref

2005-06-17 Thread bill
In [EMAIL PROTECTED] bill [EMAIL PROTECTED] writes: I have to learn Python in a hurry. My apologies. I found what I needed. I don't understand it how I missed it in my first round of searching. Thanks, bill -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-30 Thread Bill
James Stroud wrote: Frankly, I can't watch Shakespeare or movies like the full monty or trainspotting because I can't understand a damn word they say. British talk sounds like gibberish to me for the most part. Have you had your hearing checked recently? Seriously. I have a hearing defect and

Re: IDLE in Jython

2005-07-15 Thread Bill
, there are a couple of plugins for Python which should support Jython to some extent. Bill -- http://mail.python.org/mailman/listinfo/python-list

signals (again)

2005-08-10 Thread bill
I see this (or similar) question occasionally looking back through the archive, but haven't yet seen a definitive answer, so I'm going to ask it again. Consider the following: while True: do_something_to_files_in_directory(fd) fcntl(fd, F_NOTFIY, DN_CREATE) signal.pause() How do

Re: signals (again)

2005-08-11 Thread bill
How does that help? I interpret use asynchronous calls to mean use fcntl to set an FN_NOTIFY on the directory in order to be alerted when something needs to be done. But the method of doing that which I outlined above has a critical section in which the incoming signal will not be noticed. All

Re: signals (again)

2005-08-12 Thread bill
I found a good solution to this problem in Richard Steven's _Network_Programming_. It seems like everything shows up in Steven's books! Rather than pausing, you do a blocking read on a pipe. You only write to the pipe from within the signal handler. However, this brings up the better question:

documentation error

2005-09-04 Thread bill
From 3.2 in the Reference Manual The Standard Type Hierarchy: Integers These represent elements from the mathematical set of whole numbers. The generally recognized definition of a 'whole number' is zero and the positive integers. That is to say, -1 is not a whole number. The documentation

Photo Management Python Application

2006-02-18 Thread Bill
Does anyone know of a Python program that will re-name digital photo files in a date-time format based on the date stamp of the file? -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython tutorials

2005-02-25 Thread Bill
you want to learn wxPython vs. just use it. If you learn more easily building from scratch then the other replies are pointing you in the right direction. Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: autoexecution in Windows

2005-03-07 Thread Bill
the Activestate distribution it sets up the file registrations automatically. Bill -- http://mail.python.org/mailman/listinfo/python-list

bash like expansion

2005-05-12 Thread bill
Consider the following: import os, commands os.environ['QWE']=string with foo a = '$QWE ${QWE/foo/baz}' b = commands.getoutput('echo ' + a) This does what I want, which is to expand a according to the standard bash expansion rules (so b now references string with foo string with baz), but it

Re: bash like expansion

2005-05-12 Thread bill
Quick glance at the reference manual, and I think that pipes.Template may do exactly what I want. Is that what you're referring to? I realized when I woke up that I have another slight irritant: I need to be able to intelligently parse a command line. ie I need to correctly parse each of the

Re: bash like expansion

2005-05-13 Thread bill
Hmmm, the following session causes me some concern: print a $(which sh) ${HOME/b/k} 'the dog' print b /bin/sh /home/kill the dog shlex.split(a) ['$(which', 'sh)', '${HOME/b/k}', 'the dog'] shlex.split(b) ['/bin/sh', '/home/kill', 'the', 'dog'] I started with a, which contains the 3 cases

incorrect(?) shlex behaviour

2005-05-14 Thread bill
Consider: import shlex shlex.split('$(which sh)') ['$(which', 'sh)'] Is this behavior correct? It seems that I should either get one token, or the list ['$','(','which','sh',')'], but certainly breaking it the way it does is erroneous. Can anyone explain why the string is being split that

Re: incorrect(?) shlex behaviour

2005-05-15 Thread bill
Its gets worse: from shlex import StringIO from shlex import shlex t = shlex(StringIO(21)) while True: ... b = t.read_token() ... if not b: break ... print b ... 2 1--- where's the '' !? import shlex print shlex.split(21) ['21'] It strikes me that split

Re: Where's GUI for Python?

2008-03-01 Thread Bill
generate (and overwrite) its own code that remains entirely separate from your own code. Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: wxFormBuilder

2008-03-22 Thread Bill
and loaded it with wxPython. All the tedious GUI coding is gone :-) http://wxformbuilder.org/ http://wiki.wxpython.org/index.cgi/XRCTutorial What don't you like about wxGlade? It actually generates Python code. There has been a lot more development going on recently, too. Bill -- http

Re: wxFormBuilder

2008-03-22 Thread Bill
and loaded it with wxPython. All the tedious GUI coding is gone :-) http://wxformbuilder.org/ http://wiki.wxpython.org/index.cgi/XRCTutorial What don't you like about wxGlade? It actually generates Python code. There has been a lot more development going on recently, too. Bill -- http

Re: wxFormBuilder

2008-03-22 Thread Bill
and loaded it with wxPython. All the tedious GUI coding is gone :-) http://wxformbuilder.org/ http://wiki.wxpython.org/index.cgi/XRCTutorial What don't you like about wxGlade? It actually generates Python code. There has been a lot more development going on recently, too. Bill -- http

Re: timeout

2008-04-29 Thread Bill
-objects.html Bill -- http://mail.python.org/mailman/listinfo/python-list

Delicious API and urllib2

2009-04-06 Thread Bill
The delicious api requires http authorization (actually https). A generic delicious api post url is https:// username:passw...@api.api.del.icio.us/v1/posts/add?url=http:// example.com/description=interestingtags=whatever. This works fine when entered in the Firefox address bar. However

set DOS environment variable

2008-10-02 Thread bill
Hi all, Can Python set a DOS environment variable? TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

why would 'import win32com' fail?

2008-10-23 Thread bill
All, I am trying to access Excel from Python. Many of the examples started with: import win32com blah, blah I try that from my Python shell and it fails. What am I missing here? TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: why would 'import win32com' fail?

2008-10-23 Thread bill
On Oct 23, 3:21 pm, bill [EMAIL PROTECTED] wrote: All, I am trying to access Excel from Python. Many of the examples started with:       import win32com             blah, blah I try that from my Python shell and it fails. What am I missing here? TIA, Bill Thanks

OOP in Python book?

2007-07-27 Thread Bill
to be heavily into OOP theory, just some CS areas that I don't understand. I'm particularly interested in why this book is worth the $100 tag that Amazon shows. TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

More like a shell command.

2008-08-06 Thread Bill
Arg1 Arg2) Of source, I would like to do this by writing a module (or through some other run-time hook) as opposed to editing the Python source code. Thanks in advance (unless you are just a Python nut who is flaming to tell me that I should not want this. :-) ) Bill -- http

accessors and lazy initialization

2006-03-10 Thread Bill
-- Bill. -- http://mail.python.org/mailman/listinfo/python-list

Python vs. Java gzip performance

2006-03-17 Thread Bill
. Is there something that can be improved in the Python version? Thanks -- Bill. -- http://mail.python.org/mailman/listinfo/python-list

Figure out month number from month abbrievation

2006-04-12 Thread Bill
): if day == monthabbr: return index which works well enough but isn't very clever. I'm pretty new to Python; what am I missing here? Thanks -- Bill. -- http://mail.python.org/mailman/listinfo/python-list

Re: Will GPL Java eat into Python marketshare?

2006-11-15 Thread Bill
walterbyrd wrote: Some think it will. Up untill now, Java has never been standard across different versions of Linux and Unix. Some think that is one reason that some developers have avoided Java in favor of Python. Now that Java has been GPL'd that might change. IMO: it won't make much

python processes and Visual Studio

2009-01-19 Thread bill
'? TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: python processes and Visual Studio

2009-01-20 Thread bill
On Jan 19, 9:24 am, bill wgr...@draper.com wrote: All, This may sound somewhat convoluted, but here goes: 1. I have a Python script that invokes builds in Visual Studio via the command line interface - 'devenv' 2. It works GREAT 3. I have added a post_build event to a VS Solution that has

Need help to pass self.count to other classes.

2010-01-06 Thread Bill
After a year with Python 2.5 on my Windows box, I still have trouble understanding classes. Below, see the batch file and the configuration script for my Python interactive prompt. The widths of the secondary prompts increase when the self.count of SysPrompt1 exceeds 99. I am using a global

I passed a fizzbuzz test but failed at recursion.

2010-03-10 Thread Bill
Look at this recursive fizzbuzz function from http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html def fizzbuzz(num): if num: if num % 15 is 0: return fizzbuzz(num-1) + 'fizzbuzz \n' elif num % 5 is 0: return fizzbuzz(num-1) + 'buzz \n' elif num %

Need help in passing a -c command argument to the interactive shell.

2009-07-28 Thread Bill
On my windows box I type = c:\xpython -c import re The result is = c:\x In other words, the Python interactive shell doesn't even open. What am I doing wrong? I did RTFM at http://www.python.org/doc/1.5.2p2/tut/node4.html on argument passing, but to no avail. --

Re: general problem when subclassing a built-in class

2010-12-23 Thread bill
be nice to you. --bill -- http://mail.python.org/mailman/listinfo/python-list

Download all youtube favorites with youtube-dl script

2013-09-26 Thread Bill
I have been using the script youtube-dl http://rg3.github.io/youtube-dl/ And I was wondering if there is a way to download all of a user's favorites or uploads. The script has a functionality to download all videos in a txt file. So if there is a way using the youtube API or JSON (none of

Re: Download all youtube favorites with youtube-dl script

2013-09-26 Thread Bill
Joel Goldstick wrote: On Thu, Sep 26, 2013 at 11:13 AM, Bill b...@bill.com mailto:b...@bill.com wrote: I have been using the script youtube-dl http://rg3.github.io/youtube-__dl/ http://rg3.github.io/youtube-dl/ And I was wondering if there is a way to download all of a user's

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Bill
Thomas Kandler wrote: On 26.09.2013 17:13, Bill wrote: I have been using the script youtube-dl http://rg3.github.io/youtube-dl/ And I was wondering if there is a way to download all of a user's favorites or uploads. The script has a functionality to download all videos in a txt file. So

How to create an instance of a python class from C++

2014-03-04 Thread Bill
Hello: I can't figure out how to create an instance of a python class from 'C++': ( I am relatively new to Python so excuse some of the following. ) In a .py file I create an ABC and then specialize it: from MyMod import * from abc import ABCMeta, abstractmethod # Declare an

Re: How to create an instance of a python class from C++

2014-03-05 Thread Bill
instantiate a class by calling it. You should do the same in C, using PyObject_CallFunction. But as above, note that you want to call class_decl, not class_decl-ob_type. Of course. That works. Thanks. Bill -- https://mail.python.org/mailman/listinfo/python-list

I think I found 2 undocumented string format codes.

2011-08-24 Thread Bill
My google-fu has failed me in finding info on %h and %l string formatting codes. '%h' %'hello' exceptions.ValueError: incomplete format '%l' %'hello' exceptions.ValueError: incomplete format Does anyone know what doing a complete format means? --

[issue5259] gmail smtp

2009-02-18 Thread bill
Changes by bill toastedro...@gmail.com: -- title: smtplib is broken in Python3 - gmail smtp type: crash - versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5259

[issue5259] smtplib is broken in Python3

2009-02-18 Thread bill
bill toastedro...@gmail.com added the comment: sorry, pressed the wrong button. that solution does work. didn't find this until #python helped me get: return encode_base64( (\0%s\0%s % (user, password) ).encode('ascii') ) -- nosy: +toastedrobot title: gmail smtp - smtplib is broken

[issue21212] Documentation of octal representation

2014-04-14 Thread Bill
New submission from Bill: This documentation section: https://docs.python.org/3/faq/programming.html?highlight=octal#how-do-i-convert-a-string-to-a-number seems still to refer to Python 2 octal representation rules. So I think it needs updating. -- assignee: docs@python components

Uninstall

2015-08-04 Thread Bill
How do I uninstall Python from a Mac? -- https://mail.python.org/mailman/listinfo/python-list

Re: Uninstall

2015-08-07 Thread Bill
...@openend.se wrote: In a message of Tue, 04 Aug 2015 11:37:47 +0900, Bill writes: How do I uninstall Python from a Mac? -- https://mail.python.org/mailman/listinfo/python-list How did you get it in the first place? If you installed it yourself, then you have to retrace what steps you

Re: String to Dictionary conversion in python

2017-09-15 Thread Bill
santosh.yelamar...@gmail.com wrote: Hi, Can anyone help me in the below issue. I need to convert string to dictionary string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123', 'recipient': '7382432382', 'language': 'english'" Can anyone help me with the code I'm new to

Re: How do I check all variables returned buy the functions exists

2017-09-20 Thread Bill
implementation. It would be interesting to compare the results if you used the optimize option (it's either -o or -O). Bill C:\usr\share\robin\pythonDoc>python -m timeit -s"values=(1,2,None)" "any(v is None for v in values)" 100 loops, best of 3: 0.62 usec per loop C:\usr

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill <bill_nos...@whoknows.net> writes: Stefan Ram wrote: bartc <b...@freeuk.com> writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It's much easie

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Marko Rauhamaa wrote: Bill <bill_nos...@whoknows.net>: I figure that, internally, an address, a pointer, is being passed by value to implement pass by reference. Why do you say "they are right" above? Are you saying it's not pass by reference? Thank you for your examples.

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Bill wrote: Stefan Ram wrote: Bill <bill_nos...@whoknows.net> writes: Stefan Ram wrote: bartc <b...@freeuk.com> writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both Python and Java use the same value passing style: pass by object reference, or pass by shar

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Stefan Ram wrote: Bill <bill_nos...@whoknows.net> writes: Stefan Ram wrote: bartc <b...@freeuk.com> writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It's much easie

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Just as Python's »string[::-1]« appears "obfuscated" to readers who don't know Python. I understand string[::-1] after only studying python for a day or two (I've only been studying it for 2 weeks at this point). A student could study C++ for a semester or more and not

Re: search and replace first amount of strings instances with one thing and a second amount of instances with another thing-

2017-09-23 Thread Bill
Bill wrote: validationma...@gmail.com wrote: i have a code in python to search and replace what i need though is to replace the first say 10 instances of the number 1 with 2 and the second 10 instances with the number 3. anybody knows how to do that? Do you mean the (integer) number 1

Re: Python Boolean Logic

2017-09-23 Thread Bill
ing s)---if you had 5 or more statements a in a row like that, you would "miss" seeing the string s! : ) Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Mark Lawrence wrote: On 22/09/2017 08:01, Bill wrote: Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both Python and Java use the same value pass

Re: [Tutor] beginning to code

2017-09-22 Thread Bill
Bill wrote: Mark Lawrence wrote: On 22/09/2017 08:01, Bill wrote: Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both Python and Java use the s

Re: Python Boolean Logic

2017-09-22 Thread Bill
oved. I am new to Python. Maybe someone here is familiar with an elegant way to get the the value of b directly from the string s? Hmm... It appears that eval() would work (see "Python: Essential Reference", p. 115). I just read about that for the first time last night! I may try that

Re: Python Boolean Logic

2017-09-22 Thread Bill
Bill wrote: Cai Gengyang wrote: Hey guys, I'm testing this on CodeAcademy, but I cant get the program to output a result even after pressing the run button. Just wanted to check if my logic is correct. Thanks alot Your answers appear correct, but you could write Python statements to test them

Re: search and replace first amount of strings instances with one thing and a second amount of instances with another thing-

2017-09-23 Thread Bill
validationma...@gmail.com wrote: i have a code in python to search and replace what i need though is to replace the first say 10 instances of the number 1 with 2 and the second 10 instances with the number 3. anybody knows how to do that? Do you mean the (integer) number 1 or the character

Re: Python Boolean Logic

2017-09-23 Thread Bill
Steve D'Aprano wrote: On Sat, 23 Sep 2017 03:01 pm, Bill wrote: s='(20 - 10) > 15' b=(20 - 10) > 15 print(s, " is ", ("true" if b else "false") ); ## inside parentheses may be removed. I am new to Python. Maybe someone here is familiar with an e

Re: [Tutor] beginning to code

2017-09-23 Thread Bill
Stephan Houben wrote: Op 2017-09-23, Rick Johnson schreef : These pissing contests over how values are passed in Python are totally irrelevant. What does it matter? Nothing will be gained or lost by arguing over which is true, or not. Unless the distinction is

Re: [Tutor] beginning to code

2017-09-23 Thread Bill
Chris Angelico wrote: On Sun, Sep 24, 2017 at 8:18 AM, Bill <bill_nos...@whoknows.net> wrote: Stephan Houben wrote: Op 2017-09-23, Rick Johnson schreef <rantingrickjohn...@gmail.com>: These pissing contests over how values are passed in Python are totally irrelevant. What do

Re: How do I check all variables returned buy the functions exists

2017-09-20 Thread Bill
Steve D'Aprano wrote: In "any(v is None for v in values)", "any" probably isn't called until its argument is (fully) known. No, its a generator expression, so it provides the values one at a time, as needed. Okay, thank you for setting me straight. I'm only about 2 weeks down this road

Re: Fwd: Issues with python commands in windows powershell

2017-09-20 Thread Bill
Joey Steward wrote: -- Forwarded message -- From: Joey Steward Date: Tue, Sep 19, 2017 at 10:30 PM Subject: Issues with python commands in windows powershell To: python-list@python.org Hello, I've been having issues using basic python commands in

Re: errors with json.loads

2017-09-20 Thread Bill
john polo wrote: Greetings, I am using IPython 6.1.0 with Python 3.6.2 on a Windows 7 machine. I am not a programmer. I am using a book called Python Data Analytics to try to learn some of Python. I am at a section for reading and writing JSON data. The example JSON file is: Listing 5-13.

Re: errors with json.loads

2017-09-20 Thread Bill
ewlines?)? Just curious. Bill I did the same here, before I read your post. I got the same results, but did not post them. Someone has posted programs with \xA0 (NBSP IIRC) at the start of lines of the soure here before, in: From: Christopher Reimer <christopher_rei...@ya

Re: errors with json.loads

2017-09-20 Thread Bill
calling json.loads with that as an argument. Share with us what happens! Good luck, Bill john polo wrote: Greetings, I am using IPython 6.1.0 with Python 3.6.2 on a Windows 7 machine. I am not a programmer. I am using a book called Python Data Analytics to try to learn some of Python. I am

Re: errors with json.loads

2017-09-20 Thread Bill
Ned Batchelder wrote: On 9/20/17 8:22 PM, Bill wrote: Apparenty an \xa0 byte corresponds to a "non-breaking space". What sort of white space characters are allowed in a json file ( tabs and newlines?)? Just curious. These things can be looked up. From RFC 7159 (https://tool

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: bartc <b...@freeuk.com> writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It's much easier to tell what's going on, at a glance, in a C++ program. You're being

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill <bill_nos...@whoknows.net> writes: I understand string[::-1] after only studying python for a day or two (I've only been studying it for 2 weeks at this point). A student could study C++ for a semester or more and not encounter templates until they studie

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill <bill_nos...@whoknows.net> writes: "Essential Reference", and I would say that Python is definitely a bigger, and more complicated language than C++. In some aspects it has simpler syntax. But consider all of the ways that you can pass argumen

Re: Creating a Dictionary

2017-10-04 Thread Bill
Stefan Ram wrote: One might wish to implement a small language with these commands: Explain why. What is the advantage? F - move forward B - move backward L - larger stepsize S - smaller stepsize . One could start with the following pseudocode for a dictionary: { 'F': lambda:

Re: newb question about @property

2017-10-02 Thread Bill
Chris Angelico wrote: On Tue, Oct 3, 2017 at 6:23 AM, Larry Hudson via Python-list <python-list@python.org> wrote: On 10/01/2017 03:52 PM, Bill wrote: Steve D'Aprano wrote: The definitive explanation of descriptors is here: https://docs.python.org/3/howto/descriptor.html Tha

Re: newb question about @property

2017-10-02 Thread Bill
Steve D'Aprano wrote: There's no need to set the radius and the diameter, as one is completely derived from the other Good point; I'm glad I submitted my code for grading. Sort of a "trick question" to ask me to add diameter and then take off points because I used it!

Re: newb question about @property

2017-10-02 Thread Bill
I might do that yet (first things first... ). Thanks! Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-03 Thread Bill
Bill wrote: Chris Angelico wrote: Decorators are fairly straight-forward if you understand higher-order functions. ChrisA I was just minding my own business, and thought to write my first decorator for a simple *recursive* function f. The decorator WORKS if f does not make a call

Re: The "loop and a half"

2017-10-03 Thread Bill
Stefan Ram wrote: Is this the best way to write a "loop and a half" in Python? Is your goal brevity or clarity, or something else (for instance, what does the code written by the other members of your "team" look like--woudn't it be nice if it matched)? Bill x

Re: newb question about @property

2017-10-03 Thread Bill
Steve D'Aprano wrote: On Tue, 3 Oct 2017 06:51 am, Bill wrote: Can you inspire me with a good decorator problem (standard homework exercise-level will be fine)? Here is a nice even dozen problems for you. Please ask for clarification if any are unclear. Thank you for sharing the problems

Re: Lies in education [was Re: The "loop and a half"]

2017-10-10 Thread Bill
s have 5-star rankings on Amazon.com. That doesn't mean that either of them is right for everybody. Come back to Stroustrup's book "after" you learn C++ somewhere else, and maybe you'll enjoy it more. Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Bill
Marko Rauhamaa wrote: Grant Edwards : I like [const qualifiers] in C because it allows the linker to place them in ROM with the code. It also _sometimes_ provides useful diagnostics when you pass a pointer to something which shouldn't be modified to something that is

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Bill
Chris Angelico wrote: On Tue, Sep 26, 2017 at 5:35 AM, Marko Rauhamaa wrote: Chris Angelico : On Tue, Sep 26, 2017 at 12:26 AM, Marko Rauhamaa wrote: Sorry, that was my bad in the terminology. But where do you get that all Python

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Bill
Tim Golden wrote: On 25/09/2017 20:40, Marko Rauhamaa wrote: Rhodri James : On 25/09/17 15:26, Marko Rauhamaa wrote: That's not what I said. I said all expressions *evaluate to* pointers. This may well be true in particular implementations, but it is an implementation

Re: [Tutor] beginning to code

2017-09-23 Thread Bill
Steve D'Aprano wrote: On Sun, 24 Sep 2017 08:18 am, Bill wrote: All one has to do, I think, is consider (1) that passing objects by "making copies" of them, would be prohibitively expensive Swift passes certain values (but not others!) by value and makes a copy. That inc

Re: Spacing conventions

2017-09-27 Thread Bill
Thank you for all of the feedback provided! It was just what I was looking for. : ) I'm going to go back and read some of the links more carefully. Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Chris Angelico wrote: On Fri, Sep 29, 2017 at 6:59 AM, Bill <bill_nos...@whoknows.net> wrote: Chris Angelico wrote: Be careful with this one. For anything other than trivial errors (and even for some trivial errors), finding the bug is basically searching through a problem space of all

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Paul Moore wrote: On 27 September 2017 at 17:41, leam hall wrote: Hehe...I've been trying to figure out how to phrase a question. Knowing I'm not the only one who gets frustrated really helps. I'm trying to learn to be a programmer. I can look at a book and read basic code

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Chris Angelico wrote: On Fri, Sep 29, 2017 at 5:45 AM, Bill <bill_nos...@whoknows.net> wrote: Paul Moore wrote: On 27 September 2017 at 17:41, leam hall <leamh...@gmail.com> wrote: Hehe...I've been trying to figure out how to phrase a question. Knowing I'm not the only one who get

Re: Beginners and experts (Batchelder blog post)

2017-09-29 Thread Bill
Steve D'Aprano wrote: (say). Reading error messages is a skill that must be learned, even in Python. Let alone (say) gcc error messages, which are baroque to an extreme. The other day I was getting an error like: /tmp/ccchKJVU.o: In function `__static_initialization_and_destruction_0(int,

  1   2   3   4   5   6   7   8   9   10   >