Re: Help needed - - running into issues with python and its tools

2024-08-06 Thread Bill Deegan via Python-list
I’m not looking through all the packages you have installed What version of python is installed on your system? On Tue, Aug 6, 2024 at 5:24 AM o1bigtenor wrote: > > > On Mon, Aug 5, 2024 at 10:36 PM Bill Deegan > wrote: > >> why reply to me instead of to the li

Re: Help needed - - running into issues with python and its tools

2024-08-05 Thread Bill Deegan via Python-list
why reply to me instead of to the list? It's generally considered bad form to do so. Do you have any python 3 installed on your system? Or python 2.7? If not, can you install such via system package? -Bill On Mon, Aug 5, 2024 at 6:06 PM o1bigtenor wrote: > > > On Mon, Au

Re: Help needed - - running into issues with python and its tools

2024-08-05 Thread Bill Deegan via Python-list
Did Mats suggestion of: python3.13 -m venv new_venv $ new_venv/bin/python --version Python 3.13.0b4 $ source new_venv/bin/activate Not work? That should work on any system, with any system installl python. It's not trying to modify the system installed python in anyway... If not, please paste the

Re: Help needed - - running into issues with python and its tools

2024-08-05 Thread Bill Deegan via Python-list
Your approach is wrong. You don't build python from source using pip. You don't install new versions of python into a venv either. Have you read the following? https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html That seems to have instructions for what you want to d

Re: Current thinking on required options

2021-04-19 Thread Bill Campbell
Usage: grocli check|add|delete [-u USERS ...] Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www2.celestial.com/ 6641 E. Mercer Way Mobile: (206) 947-5591 PO Box 820 Fax:(206) 232-9186 Mercer Island, WA 98040-0820 Force alwa

Re: How to remove "" from starting of a string if provided by the user

2020-08-11 Thread Bill Campbell
27;' import re pat = re.compile(r'^([\'"])(.*)(\1)$') slast = None while slast != s: slast = s s = pat.cub(r'\2', s) return s # end stripquotes(s) Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Soft

SCons 4.0.1 Released

2020-07-16 Thread Bill Deegan
A new SCons release, 4.0.1, is now available on the SCons download page: https://scons.org/pages/download.html Here is a summary of the changes since 4.0.1: NEW FUNCTIONALITY - Added Environment() variable TEMPFILEDIR which allows setting the directory which temp fil

Re: Missing python curses functions?

2020-05-19 Thread Bill Campbell
equivalent is attr_get() which gets the current >attributes. I haven't looked for it. ... >Is anyone other than me still even using Python curses? :-) Raises hand. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www2.celestial.com/ 6641 E.

Re: OT: ALGOL 60 at 60

2020-05-16 Thread Bill Campbell
ng methods I use today have their roots in doing a lot of scientific programming in ALGOL on the B-5500, then in BPL (Burroughs Programming Language) on Burroughs Medium Systems, B-2500->B-4500. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www2.celestia

Re: [Scons-dev] SCons 3.1.2 Released

2019-12-21 Thread Bill Deegan
Glad that helped! Big thanks to Mats Wichmann for that one! On Sat, Dec 21, 2019 at 10:41 AM Eric Fahlgren wrote: > On Mon, Dec 16, 2019 at 7:02 PM Bill Deegan > wrote: > >> - EXPERIMENTAL NEW FEATURE: Enable caching MSVC configuration >> If SCONS_CACHE_MSVC_CON

SCons 3.1.2 Released

2019-12-16 Thread Bill Deegan
A new SCons checkpoint release, 3.1.2, is now available on the SCons download page: https://scons.org/pages/download.html Here is a summary of the changes since 3.1.1: NOTE: The 4.0.0 Release of SCons will drop Python 2.7 Support NEW FUNCTIONALITY - Added debug option "a

Re: Vim settings for Python (was: tab replace to space 4)

2019-12-07 Thread Bill Campbell
On Sat, Dec 07, 2019, Peter J. Holzer wrote: >As an aside, to prevent vim from inserting tabs in the first place, set >expandtab >sw=4 >and maybe also >ts=4 Inserting a comment in the file like this makes thing easy. # vim: expandtab sw=4 ts=4 nows wm=0 Bill --

Re: Using Makefiles in Python projects

2019-11-11 Thread Bill Deegan
You could use SCons (native python... ) On Mon, Nov 11, 2019 at 2:04 PM Grant Edwards wrote: > On 2019-11-11, Rhodri James wrote: > >> I'm sure it's possible to write Makefiles that work with both GNU make > >> and NMake, but I imagine it's a rather limiting and thankless > enterprise. > >> > >

Re: Would you be interested in this Python open source project?

2019-10-08 Thread Bill Deegan
You might just consider working with the BuildBot project to add support for lighter weight build workers. Re-Re-Re-inventing the wheel is almost always wasted effort. On Tue, Oct 8, 2019 at 8:33 AM Rhodri James wrote: > On 08/10/2019 11:22, Simon Connah wrote: > > I'm posting this message as a

Announcing Methodfinder

2019-09-10 Thread Bill Six
1) == 1 -(-1) -1.bit_length() -1.denominator abs(-1) >>> methodfinder.find(1,2) == 3 1+2 1^2 1|2 2+1 2^1 2|1 >>> methodfinder.find(1,1) == 1 1&1 1**1 1*1 1.__class__(1) 1.denominator 1.numerator 1.real 1//1 1|1 math.gcd(1, 1) max(1, 1) min(1, 1) pow(1, 1) round(1, 1) >>> methodfinder.find([1,2], '__iter__') == True hasattr([1, 2], '__iter__') Bill Six -- https://mail.python.org/mailman/listinfo/python-list

SCons 3.1.1 Released

2019-08-08 Thread Bill Deegan
SCons - a software construction tool What is SCons? SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/au

SCons 3.1.0 Released

2019-07-20 Thread Bill Deegan
A new SCons checkpoint release, 3.1.0, is now available on the SCons download page: https://scons.org/pages/download.html SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic

Re: pip vs python -m pip?

2019-06-21 Thread Bill Deegan
you must be picking up pip from a different python installl (or virtualenv) than you are picking up python. Check your %PATH% On Fri, Jun 21, 2019 at 6:29 AM Malcolm Greene wrote: > 64-bit Python 3.6.8 running on Windows with a virtual environment > activated. > > "pip -v" reports 19.0.3 > "pyth

SCons 3.0.5 Released

2019-03-26 Thread Bill Deegan
A new SCons release, 3.0.5, is now available on the SCons download page: https://scons.org/pages/download.html And via pypi: pip install scons SCons is a tool for building software (and other files). SCons is implemented in Python, and its "configuration files" are actually Pyth

Re: Convert Windows paths to Linux style paths

2019-03-12 Thread Bill Campbell
arators plus some other platform specific logic? See os.path.join Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www2.celestial.com/ 6641 E. Mercer Way Mobile: (206) 947-5591 PO Box 820 Fax:(206) 232-9186 Mercer Island, WA 98040-0820

Re: preferences file

2019-01-27 Thread Bill Campbell
nicely with the ConfigParser libraries. >3. File location? I'm using Ubuntu and I believe that the correct location >would be home/.config/ . What about Mac and Windows? See above. Same for Mac. I don't do Windows. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Softw

SCons 3.0.4 Release

2019-01-23 Thread Bill Deegan
A new SCons release, 3.0.4, is now available on the SCons download page: http://www.scons.org/download.php Or via pypi: pip install scons Here is a summary of the changes since 3.0.3: NEW FUNCTIONALITY - Added TEMPFILESUFFIX to allow user to specify suffix for

SCons Version 3.0.3 Released

2019-01-07 Thread Bill Deegan
A new SCons release, 3.0.3, is now available on the SCons download page: https://scons.org/pages/download.html Here is a summary of the changes since 3.0.1: NEW FUNCTIONALITY - Properly support versioned shared libraries for MacOS. We've also introduced two new env v

SCons 3.0.2 Release

2019-01-01 Thread Bill Deegan
A new SCons release, 3.0.2, is now available on the SCons download page: https://scons.org/pages/download.html Here is a summary of the changes since 3.0.1: NEW FUNCTIONALITY - Properly support versioned shared libraries for MacOS. We've also introduced two new env va

Re: [Tutor] Unable to get the gateway IP of wlan interface using python code

2018-11-12 Thread Bill Campbell
return str(f.read().strip())* This command should get the gateway IP. Linux: cmd = "ip route list | awk '/^default/{print $3}'" or perhaps Linux: cmd = "netstat -rn | awk '/^0.0.0.0/{print $2}'" OSX: cmd = "netstat -rn | awk '/^default/{print $2}&#x

Re: Google weirdness

2018-07-13 Thread Bill Deegan
I also got such. I'm guessing your track record of searches has flagged you as someone they might want to hire. On Fri, Jul 13, 2018 at 5:36 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Thu, 12 Jul 2018 22:31:35 -0400, Travis McGee wrote: > > > I somehow managed to trig

Splitting up large python module impact on performance?

2018-06-12 Thread Bill Deegan
Greetings, I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. Should I expect any performance hit from splitting some of the classes out to other files? Thanks, Bill -- https://mail.python.org/mailman/listinf

Re: [Python-Dev] [RELEASE] Python 2.7.15

2018-05-01 Thread Bill Deegan
Is it possible to get the release notes included on the download page(s)? On Tue, May 1, 2018 at 10:35 AM, Guido van Rossum wrote: > Simple. I misread "latest" for "last" and was hopeful that no new bugs > would need to be fixed between now and 2020. I will post a correction on > Twitter now. >

Re: www.python.org down

2018-04-30 Thread Bill Deegan
back up for me. On Mon, Apr 30, 2018 at 2:26 PM, Mark Lawrence wrote: > On 30/04/18 19:17, Paul Moore wrote: > >> It's working for me now. >> Paul >> >> On 30 April 2018 at 18:38, Jorge Gimeno wrote: >> >>> Not sure who to report to, but the site comes back with a 503. Anyone >>> know >>> where

Re: www.python.org down

2018-04-30 Thread Bill Deegan
Still 502 for me. On Mon, Apr 30, 2018 at 2:17 PM, Paul Moore wrote: > It's working for me now. > Paul > > On 30 April 2018 at 18:38, Jorge Gimeno wrote: > > Not sure who to report to, but the site comes back with a 503. Anyone > know > > where I can direct this to? > > > > -Jorge L. Gimeno > >

Re: www.python.org down

2018-04-30 Thread Bill Deegan
Ditto. I see a 502. On Mon, Apr 30, 2018 at 1:38 PM, Jorge Gimeno wrote: > Not sure who to report to, but the site comes back with a 503. Anyone know > where I can direct this to? > > -Jorge L. Gimeno > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailm

Re: Minmax tictactoe :c Cannot understand why this does not work

2018-04-24 Thread Bill
You need a good lesson in "program documentation". Your code looks terrible--really! fifii.ge...@gmail.com wrote: class AiMove: def __init__(self): self.x = -1 self.y=-1 self.score = 0 def Imprimir(Matriz,n): for i in range(n):

Re: please test the new PyPI (now in beta)

2018-03-29 Thread Bill Deegan
Re color. Would the python.org background color (which is darker) work? To my eyes the background on pypi looks like the highlight color on python.org (I've said this earlier, but just curious if that's what others see as well) On Thu, Mar 29, 2018 at 2:33 PM, Ethan Furman wrote: > On 03/29/201

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Bill Deegan
The back ground blue on the pypi page is the highlight blue on the python.org page, they should change the color to match to background python.org color. -Bill On Tue, Mar 27, 2018 at 7:50 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 27 Mar 2018

Re: Python gotcha of the day

2018-03-13 Thread Bill
Dan Sommers wrote: On Wed, 14 Mar 2018 04:08:30 +, Steven D'Aprano wrote: Explain the difference between these two triple-quoted strings: But remove the spaces, and two of the quotation marks disappear: py> """\"" '"' That's (a) a triple quoted string containing a single escaped q

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Bill
boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does not really hate Pytho

Re: correctness proof for alpha-beta algorithm

2017-12-20 Thread Bill
Steve D'Aprano wrote: On Thu, 21 Dec 2017 08:37 am, Bill wrote: namenobodywa...@gmail.com wrote: On Tuesday, December 19, 2017 at 3:28:39 PM UTC-8, Steve D'Aprano wrote: Does this have anything specifically to do with Python programming? i'm working on a game-playing script

Re: correctness proof for alpha-beta algorithm

2017-12-20 Thread Bill
namenobodywa...@gmail.com wrote: On Tuesday, December 19, 2017 at 3:28:39 PM UTC-8, Steve D'Aprano wrote: Does this have anything specifically to do with Python programming? i'm working on a game-playing script (ie: in python), i want to incorporate pruning into my search algorithm, and i'd l

Re: adding elif to for

2017-12-19 Thread Bill
bob gailer wrote: Has any thought been given to adding elif to the for statement? I don't think it is a good idea because it needlessly, from my point of view, embeds too much complexity into a single construct (making it more difficult to maintain, for instance). That's what language designe

Re: Python Learning

2017-12-18 Thread Bill
. ; )The point of college is more about teaching students to think rather than in being efficient. I have little doubt that a tech school could "get through everything" much faster. Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-18 Thread Bill
Chris Angelico wrote: On Sun, Dec 17, 2017 at 12:01 PM, Bill wrote: I think we are talking about the same people. But in college, the prerequisite of "at least co-enrolled in pre-calc", turned out to be the right one (based upon quite a lot of teaching experience). Fortunate

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: On Mon, Dec 18, 2017 at 4:04 PM, Chris Angelico wrote: On Mon, Dec 18, 2017 at 3:54 PM, Bill wrote: Chris Angelico wrote: I don't know about vtables as needing to be in ANY programming course. They're part of a "let's dive into the internals

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: I agree with some of that, but you then take it to absurdity. You most certainly CAN drive a car without knowing how one works; in fact, with this century's cars, I think that's very much the case. How many people REALLY know what happens when you push the accelerator pedal

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: I don't know about vtables as needing to be in ANY programming course. They're part of a "let's dive into the internals of C++" course. You certainly don't need them to understand how things work in Python, because they don't exist; and I'm doubtful that you need to explain

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: I don't know about vtables as needing to be in ANY programming course. They're part of a "let's dive into the internals of C++" course. You certainly don't need them to understand how things work in Python, because they don't exist; and I'm doubtful that you need to explain

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: On Mon, Dec 18, 2017 at 11:31 AM, Bill wrote: Larry Martell wrote: So, your experience is that the style of learning you offer is unsuitable to anyone who doesn't have some background in algebra. That's fine. For your course, you set the prereqs. But that'

Re: Python Learning

2017-12-17 Thread Bill
Chris Angelico wrote: On Mon, Dec 18, 2017 at 6:51 AM, Bill wrote: The point is that it takes a certain amount of what is referred to as "mathematical maturity" (not mathematical knowledge) to digest a book concerning computer programming. Emphasis on *a book*. In my years o

Re: Python Learning

2017-12-17 Thread Bill
Gregory Ewing wrote: Bill wrote: In my years of teaching experience, students who came to college without the equivalent of "college algebra" were under-prepared for what was expected of them. This could be simply because it weeds out people who aren't good at the required st

Re: Python Learning

2017-12-17 Thread Bill
Larry Martell wrote: So, your experience is that the style of learning you offer is unsuitable to anyone who doesn't have some background in algebra. That's fine. For your course, you set the prereqs. But that's not the only way for someone to get into coding. You do NOT have to go to college be

Re: Python Learning

2017-12-17 Thread Bill
Rustom Mody wrote: In response to Rustom Mody wrote: On Saturday, December 16, 2017 at 9:45:17 AM UTC+5:30, Bill wrote: so it really doesn't make that much difference where one starts, just "Do It!". : ) Really ¿? https://en.wikipedia.org/wiki/Principles_of_learning#Prim

Re: Python Learning

2017-12-16 Thread Bill
Gregory Ewing wrote: Bill wrote: In my experience, if they do not have the basic (~pre-calc) math behind them, then learning from a textbook on a programming language, say, may be a bit beyond them. Very little mathematical *knowledge* is needed to get started with programming. You can do a

Re: Python Learning

2017-12-16 Thread Bill
Rustom Mody (Rustom Mody) wrote: On Saturday, December 16, 2017 at 9:45:17 AM UTC+5:30, Bill wrote: Chris Angelico wrote: On Sat, Dec 16, 2017 at 8:51 AM, Bill wrote: Varun R wrote: Hi All, I'm new to programming, can anyone guide me, how to start learning python programming language,.

Re: Python Learning

2017-12-15 Thread Bill
Chris Angelico wrote: On Sat, Dec 16, 2017 at 8:51 AM, Bill wrote: Varun R wrote: Hi All, I'm new to programming, can anyone guide me, how to start learning python programming language,...plz suggest some books also. Thanks all Are you sure you want to learn Python first? Python

Re: Python Learning

2017-12-15 Thread Bill
Varun R wrote: Hi All, I'm new to programming, can anyone guide me, how to start learning python programming language,...plz suggest some books also. Thanks all Are you sure you want to learn Python first? Python does enough things "behind the scene" that it makes me question the wisdom of t

Re: Processing Game Help

2017-12-10 Thread Bill
sooner I start doing that, the sooner my debugging session is over. Good luck! Bill As you can see, I tried using globals in order use variables from previous classes, but nothing has worked. For this specific approach, no error message popped up, but nothing happened either. Thanks so muc

Re: Python homework

2017-12-06 Thread Bill
I think carelessness in choosing variable names may be at the root of the problem. nick.martin...@aol.com wrote: I have a question on my homework. My homework is to write a program in which the computer simulates the rolling of a die 50 times and then prints (i). the most frequent side of the

Re: Easiest way to access C module in Python

2017-11-06 Thread Bill
John Pote wrote: Hi all, I have successfully used Python to perform unit and integration tests in the past and I'd like to do the same for some C modules I'm working with at work. There seem to be a number of ways of doing this but being busy at work and home I looking for the approach with th

Re: Getting started with python

2017-10-30 Thread Bill
subhendu.pand...@gmail.com wrote: Hi, Could you please help me with the below if possible: Possible and reasonable are two different things. Why don't you try some web searches and try to answer some of your own questions. I offer this advice as a Python newbe myself. Bill 1.

Re: Let's talk about debuggers!

2017-10-25 Thread Bill
Fabien wrote: On 10/25/2017 03:07 PM, Thomas Jollans wrote: What options are there for Python (that work)? PyCharm's debugger is fine (also available in the community edition) +1 Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-list

Re: I used list, def. why li += [100,200] , and li = li + [100,200] is different

2017-10-23 Thread Bill
f scope, nothing points to that newly created object and it gets lost. The problem and both solutions are great! Thanks for posting! 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 going to try to modify it.

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

2017-10-11 Thread Bill
Grant Edwards wrote: On 2017-10-11, Bill wrote: Grant Edwards wrote: On 2017-10-11, Bill wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the wor

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

2017-10-11 Thread Bill
Mikhail V wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... PHP seems (seemed?) popular for laying out web pages. Are their vastly superior options? Python? Superi

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

2017-10-11 Thread Bill
Grant Edwards wrote: On 2017-10-11, Bill wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... PHP seems (seemed?) popular for laying

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

2017-10-10 Thread Bill
Dennis Lee Bieber wrote: On Tue, 10 Oct 2017 20:48:26 -0400, Bill declaimed the following: cast stones at C/C++. People started programming in C in the late 70's, and before that some were programming in B ("B Programming Language"), Preceded by BCPL (which leads t

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

2017-10-10 Thread Bill
ou still need folks who can encode data structures and write device drivers, from scratch. And "woe" if you need performance, such as applications involving AI. Cheers, Bill But even if it were the best language in the world, and Stroustrup the greatest language designer in the

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

2017-10-10 Thread Bill
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: why does memory consumption keep growing?

2017-10-05 Thread Bill
Fetchinson . wrote: Hi folks, I have a rather simple program which cycles through a bunch of files, does some operation on them, and then quits. There are 500 files involved and each operation takes about 5-10 MB of memory. As you'll see I tried to make every attempt at removing everything at th

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

2017-10-05 Thread Bill
Marko Rauhamaa wrote: That's good advice, but it's not all that dangerous to express off-topic statements in this newsgroup. It may not be "dangerous", but I find it a little annoying. I wasn't going to say anything, but now you are bringing it up explicitly. -- https://mail.python.org/ma

Re: Introducing the "for" loop

2017-10-05 Thread Bill
n shown so far. As long as I have two teachers here, which textbooks are you using? I am hoping to teach a college course in Python next fall. Thanks, Bill The basic course may already and there after about 12 - 18 hours. (This time includes many exercises in the classroom.) B

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

Re: Python community "welcoming" feedback

2017-10-04 Thread Bill
Leam Hall wrote: A while back I pointed out some challenges for the Python community's intake of new coders. Mostly focusing on IRC and the Python e-mail list. What is the Python e-mail list? Thanks, Bill Several people have stepped up their "welcome" game and I've

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

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 pro

Re: newb question about @property

2017-10-02 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 to

Re: newb question about @property

2017-10-02 Thread Bill
eason 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-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 becaus

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 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 Thank you! It is next on my list.

Re: newb question about @property

2017-10-02 Thread Bill
n exercise :-) It WAS a good exercise!! I was concerned about "infinite recursion" between my two property setters.. Thanks! Next? :) Bill import math class Circle(object): """ Define a circle class with radius and diameter""" def __i

Re: newb question about @property

2017-10-01 Thread Bill
Steve D'Aprano wrote: The definitive explanation of descriptors is here: https://docs.python.org/3/howto/descriptor.html Thank you! It is next on my list. Then I'll try that Circle problem you mentioned as an exercise last night! I don't expect run into any difficulties. : ) -- https:/

Re: newb question about @property

2017-10-01 Thread Bill
Stephan Houben wrote: Op 2017-10-01, Bill schreef : I watched an example on YouTube where someone wrote a simple descriptor ("@Time_it) to output the amount of time that it took ordinary functions to complete.To be honest, I AM interested in descriptors. Are you sure you are not conf

Re: newb question about @property

2017-10-01 Thread Bill
Steve D'Aprano wrote: On Sun, 1 Oct 2017 05:46 pm, Bill wrote: If you were going to show non-Python users, say science undergraduates and faculty, that Python is an interesting tool (in 45 minutes), would one delve into descriptors? Hell no :-) Oops, I see I used the word "descript

Re: newb question about @property

2017-10-01 Thread Bill
Steve D'Aprano wrote: [1] Technically, the interpreter knows nothing about properties. What it cares about is *descriptors*. Properties are just one kind of descriptor, as are methods. But I'm intentionally not talking about the gory details of descriptors. Feel free to ask if you care, but hone

Re: newb question about @property

2017-09-30 Thread Bill
u think are good, I would be interested. Thanks, Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-09-30 Thread Bill
Ned Batchelder wrote: On 9/30/17 7:18 PM, Bill wrote: Ned Batchelder wrote: On 9/30/17 5:47 PM, Bill wrote: I spent a few hours experimenting with @property. To my mind it seems like it would be preferable to just define (override) instance methods __get__(), __set__(), and possibly __del__

Re: newb question about @property

2017-09-30 Thread Bill
Steve D'Aprano wrote: On Sun, 1 Oct 2017 08:47 am, Bill wrote: I spent a few hours experimenting with @property. To my mind it seems like it would be preferable to just define (override) instance methods __get__(), __set__(), and possibly __del__(), as desired, as I could easily provide

Re: newb question about @property

2017-09-30 Thread Bill
Ned Batchelder wrote: On 9/30/17 5:47 PM, Bill wrote: I spent a few hours experimenting with @property. To my mind it seems like it would be preferable to just define (override) instance methods __get__(), __set__(), and possibly __del__(), as desired, as I could easily provide them with

newb question about @property

2017-09-30 Thread Bill
I spent a few hours experimenting with @property. To my mind it seems like it would be preferable to just define (override) instance methods __get__(), __set__(), and possibly __del__(), as desired, as I could easily provide them with "ideal" customization. Am I overlooking somethi

Re: Beginners and experts (Batchelder blog post)

2017-09-29 Thread Bill
Chris Angelico wrote: On Sat, Sep 30, 2017 at 2:42 AM, Steve D'Aprano wrote: Oh, and I'd like to make a (moderate) defense of a kind of "bug fixing by random perturbation". Obviously making unrelated, arbitrary changes to code is bad. But making non-arbitrary but not fully understood changes to

Re: Refactoring

2017-09-29 Thread Bill
Stefan Ram wrote: The customer pays for the solution. The software manufacturer does the refactoring for it's own sake, because when it's a longer running project, the refactorings will pay for themself. The customer owns the source code (at least where I was). YMMV -- https://ma

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, int)'

Re: Spacing conventions

2017-09-28 Thread Bill
Steve D'Aprano wrote: On Thu, 28 Sep 2017 03:56 pm, Bill wrote: I worked in maintenance programming. You got the hand you were dealt! And you weren't allowed to "improve" the code unless the customer contracted you to do so. How do you tell the difference between a

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 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 things that could potentially

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

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 in a few languages b

Re: Spacing conventions

2017-09-27 Thread Bill
Steve D'Aprano wrote: Similarly for break and continue. I can still see their use causing potential trouble in (really-long) real-world code. How so? Besides, if your code is "really long", you probably should factorise it into smaller, meaningful chunks. I worked in maintenance programm

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

Spacing conventions

2017-09-27 Thread Bill
"--but that was a while back. I can still see their use causing potential trouble in (really-long) real-world code. Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread Bill
Steve D'Aprano wrote: On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote: Steve D'Aprano writes: On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote: at that moment, but it still needed correction. If the assignment is an alias operator then after the statements Here's some C++ code that demonstr

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 detail so Chris' point

  1   2   3   4   5   6   7   >