Re: Python-list Digest, Vol 232, Issue 1

2023-01-01 Thread Christman, Roger Graydon
. So, I am very happy with this Python language decision -- it allows for the most efficient means to modify a list in place and also very much reduce the danger of aliasing bugs. Roger Christman Pennsylvania State University From: Python-list on behalf

Re: memoization (original Subject lost because mailer lost the whole thread)

2022-09-19 Thread Christman, Roger Graydon
ocess is straightforward enough that you could even define a decorator that could be applied to any function you choose. I don't have an example handy just because I never took the time to write one. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue45804] IDLE - faster shell writing

2021-11-14 Thread Roger Serwy
Roger Serwy added the comment: All good questions, Terry! I do have a git clone of the cpython repo, but I haven't worked through the new commit/patch process since Mercurial. I'm a bit rusty. The buffering provided is for calls to `write`. It does not do any line buffering. Calls

[issue45804] IDLE - faster shell writing

2021-11-13 Thread Roger Serwy
New submission from Roger Serwy : The shell provided by IDLE uses synchronous sys.stdout.write() calls between the subprocess and the front-end, leading to very slow writes. The provided patch proposes buffering the stdout/stderr streams in the subprocess and then sending a single update

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
particular value that would be both tested and reused, and not that it would be used to assign to a value that was not being tested (such as the a part of (a,b)). Or in short, I do not find your choice of use-case really lines up with the rationale given for walrus operator. You are free to disagree with me, but fortunately, we have one of those PEP authors participating in this list regularly if you want his opinion. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
compelled to create tuple and lists in all of your use-cases, even when they serve no purpose. Roger Christman -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-25 Thread Christman, Roger Graydon
as described in its PEP just as it is, and I see no compelling reason to expand its use. It is there to reduce code size by eliminating a duplication of code, If the code you write using the walrus operator is longer or more complicated than the code would be without it, you are misusing it. Roger

[issue41907] Regression in IntFlag behaviour in f-string

2020-10-01 Thread Roger Taylor
New submission from Roger Taylor : An IntFlag member before 3.8.6 was converted to an integer in an f-string. After 3.8.6, the textual IntFlag class and member name are placed in the interpolated f-string instead of the integer. 3.8.3: f"... {X.F} ..." where X.F = 1 << 4 w

Re: new feature in Python

2020-09-30 Thread Christman, Roger Graydon
quot; token somewhere earlier in the program statement. Besides, I could foresee a lot of programming errors when people would start to generalize this operation to do things like: list .= append(item) list .= sort() which would most certainly be incorrect. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue41548] Tk Window rendering on macOS Big Sur

2020-08-26 Thread Roger Meier
Roger Meier added the comment: The latest macOS Big Sur Public Beta (5, Build 20A5354i) fixes the issue with TK Window rendering. -- resolution: -> works for me ___ Python tracker <https://bugs.python.org/issu

[issue41548] IDLE Window rendering on macOS Big Sur

2020-08-14 Thread Roger Meier
Roger Meier added the comment: I have screen capture demonstrating the issue, which I posted here: https://groups.google.com/g/thonny/c/529A5zEsuWg/m/xHVCny8OBwAJ -- type: -> behavior ___ Python tracker <https://bugs.python.org/issu

[issue41548] IDLE Window rendering on macOS Big Sur

2020-08-14 Thread Roger Meier
New submission from Roger Meier : macOS Big Sur, Public Beta (20A5343j) There is noticeable window flickering when the IDLE window is being resized manually. It sometimes become translucent, and sometimes the window frame isn't properly refreshed after resizing, but simply by switching

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-19 Thread Roger Gammans
Roger Gammans added the comment: But namespace packages are still useful for what PEP420 envisages and they should be able to have runnable tests. For instance projectX/ - interfaces/ - proxyX.py - testX.py projectY/ - intefaces/ - proxyY.py

Re: Friday Finking: Limiting parameters

2020-07-11 Thread Christman, Roger Graydon
ou still end up with a large number of independent parameters, I would question the simplicity of your function's intent. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Poly more thick

2020-02-29 Thread Christman, Roger Graydon
Emending my own note from moments ago: def any_as_dict(*args, **kwargs): if len(args) == 0: my_dict = kwargs elif type(args[0]) == type(dict()): my_dict = args[0] else: my_dict = dict(args[0]) print(type(my_dict),my_dict) >>> any_as_dict(a=1,b=2) {'a': 1, 'b': 2} >>> any_as_dict({'a':1,

Re: Friday Finking: Poly more thick

2020-02-29 Thread Christman, Roger Graydon
, 1): ('b', 2)} >>> any_as_dict({('a',1), ('b',2)}) {('b', 2): ('a', 1)} This seems to address your apparent definition of "key-value pairs" in the form of a=1, b=2 and my interpretation as key-value tuples, either in a list, or set, or presumably any iterable collection, in

[issue39765] asyncio loop.add_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
Roger Dahl added the comment: > I'm sorry. but loop.set_signal_handler() method doesn't exist. Oops, fixed. > Assuming you mean loop.add_signal_handler() method, I would say that a > minute-long delay is a sign of long blocking calls in your program. During the delay for the

[issue39765] asyncio loop.set_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
Change by Roger Dahl : -- keywords: +patch pull_requests: +18028 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18664 ___ Python tracker <https://bugs.python.org/issu

[issue39765] asyncio loop.set_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
New submission from Roger Dahl : This is a ticket to document two ways in which the behavior of loop.set_signal_handler() may not match what the user expects. First, callbacks to handlers registered with loop.set_signal_handler() may be significantly delayed. I have a program where I've

Re: encapsulating a global variable (BlindAnagram)

2020-02-25 Thread Christman, Roger Graydon
e dictionary in the first place. Is it practical to have the entire dictionary statically defined? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue38374] Remove weakref.ReferenceError entry from documentation

2020-02-10 Thread Roger Hurwitz
Change by Roger Hurwitz : -- keywords: +patch pull_requests: +17826 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18452 ___ Python tracker <https://bugs.python.org/issu

[issue38374] Remove weakref.ReferenceError entry from documentation

2020-02-10 Thread Roger Hurwitz
Roger Hurwitz added the comment: At PyCascades CPython sprint and reviewing this issue. -- nosy: +rogerhurwitz ___ Python tracker <https://bugs.python.org/issue38

[issue39594] Typo in documentation for os.times

2020-02-10 Thread Roger Hurwitz
Change by Roger Hurwitz : -- keywords: +patch pull_requests: +17817 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18443 ___ Python tracker <https://bugs.python.org/issu

[issue39594] Typo in documentation for os.times

2020-02-10 Thread Roger Hurwitz
Roger Hurwitz added the comment: Reviewing this as part of the CPython sprint at PyCascades. -- nosy: +rogerhurwitz ___ Python tracker <https://bugs.python.org/issue39

[issue16776] Document PyCFunction_New and PyCFunction_NewEx functions

2020-02-10 Thread Roger Hurwitz
Roger Hurwitz added the comment: I am at PyCascades at the CPython sprint, and I will work on this issue to the best of my ability. -- nosy: +rogerhurwitz ___ Python tracker <https://bugs.python.org/issue16

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2019-08-19 Thread Roger Gammans
Change by Roger Gammans : -- nosy: +rgammans ___ Python tracker <https://bugs.python.org/issue23882> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35617] unittest discover does not work with implicit namespaces

2019-08-19 Thread Roger Gammans
Change by Roger Gammans : -- nosy: +rgammans ___ Python tracker <https://bugs.python.org/issue35617> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36723] Unittest Discovery for namespace subpackages dot notation fails

2019-08-19 Thread Roger Gammans
Roger Gammans added the comment: I think this is a duplicate of one (or both) of 35617, or 23882 . Both of those have unmerged proposed fixes. -- nosy: +rgammans ___ Python tracker <https://bugs.python.org/issue36

Re: Loop with Else Clause

2019-02-05 Thread Christman, Roger Graydon
a 'single' language element in any programming language I can think of that does what you ask -- so stick with the cleaner: if (__): # loop; else: #don't loop Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE Default Working Directory

2018-11-13 Thread Christman, Roger Graydon
opment environment. If that's impossible, then I guess I'll have to fire a note off to the university tech support requesting them to play with that "Start In" option through %AppData%, or whatever it was. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE Default Working Directory

2018-11-12 Thread Christman, Roger Graydon
eryk sun responded: On 11/12/18, Christman, Roger Graydon wrote: > > I looked in IDLE's own configuration menu, and didn't see anything there -- > and I fear that I might have to fight some Windows settings somewhere else > instead. I think this i

IDLE Default Working Directory

2018-11-12 Thread Christman, Roger Graydon
there -- and I fear that I might have to fight some Windows settings somewhere else instead. I think this is Windows 10. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue31880] subprocess process interaction with IDLEX GUI causes pygnuplot silent failures

2018-11-01 Thread Roger Serwy
Roger Serwy added the comment: I am closing this issue. For future reference, IDLEX is a separate project from IDLE. Please refer IDLEX bugs to the project developer (me). -- assignee: -> terry.reedy components: +IDLE -Interpreter Core, Windows nosy: +roger.serwy, terry.reedy st

[issue33000] IDLE Doc: Text consumes unlimited RAM, consoles likely not

2018-11-01 Thread Roger Serwy
Roger Serwy added the comment: Big Stone: Yes, IDLEX does have a slow memory leak. Please check if this bug is happening with IDLE itself. Terry: Thanks for responding to this. I suggest this issue can be closed. -- nosy: +roger.serwy ___ Python

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
Roger Aiudi added the comment: Using your above example, my use case is returning an instance of Spam instead of PurePath from the division operation. The Spam class would have extra properties and methods for dealing with a substructure of our file system that can exist in different places

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
New submission from Roger Aiudi : PurePath.__truediv__ and __rtruediv__ raise a TypeError when passed something which is not an instance of string or PurePath. This prevents creating any sort of compatible class that doesn't inherit from the previously mentioned types. -- components

Re: What is not working with my "map" usage?

2018-09-22 Thread ROGER GRAYDON CHRISTMAN
t to. The * and ** prefixes really should be avoided as much as possible,unless you know exactly what you are getting out of them. Roger ChristmanPennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2018-07-28 Thread roger
roger added the comment: working on this on europython -- nosy: +rogerduran ___ Python tracker <https://bugs.python.org/issue34226> ___ ___ Python-bugs-list m

Re: Stock quote AP

2018-03-12 Thread ROGER GRAYDON CHRISTMAN
use with a dictionary. You would just need to get a dictionary Reader from the csv module, import urllib.request import io, csv file = urllib.request.urlopen(site + filename) data = io.TextIOWrapper(file, newline="", encoding="utf-8") reader = csv.DictReader(data) f

Re: RFC: Proposal: Deterministic Object Destruction

2018-02-28 Thread ROGER GRAYDON CHRISTMAN
ave a program that can get by leaving unused memory allocated, and can still terminate the program before all the memory is claimed, your reference count system is far less efficient than relying on a garbage collector that happens to not get activated before your program ends. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue32860] Definition of iglob does not mention single star (unlike glob)

2018-02-16 Thread Roger Erens
New submission from Roger Erens <snerere...@gmail.com>: Although both glob and iglob have the same arity in Lib/glob.py: def glob(pathname, *, recursive=False) def iglob(pathname, *, recursive=False): the documentation only mentions for glob the single star https://docs.python.org/3/l

[issue22167] iglob() has misleading documentation (does indeed store names internally)

2018-02-16 Thread Roger Erens
Roger Erens <snerere...@gmail.com> added the comment: http://bugs.python.org/issue25596 has been closed... -- nosy: +Roger Erens ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32661] ProactorEventLoop locks up on close call

2018-01-24 Thread Roger Taylor
New submission from Roger Taylor <roger.taylor.em...@gmail.com>: The following problem only occurs when I use ProactorEventLoop. If I use 'asyncio.get_event_loop()' it exits normally, rather than infinite looping in IOCP land. 1. I run the attached 'bug.py' script in a DOS

[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-12-27 Thread Roger Wang
Change by Roger Wang <wen...@gmail.com>: -- nosy: +rogerwang ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31639> ___ __

Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN
On Sat, Dec 16, 2017, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sat, Dec 16, 2017 at 11:41 PM, Marko Rauhamaa wrote: >> r...@zedat.fu-berlin.de (Stefan Ram): >> As a start, one should learn: >> >> 1.) how to install Python >> (if not

Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN
;From my experience, both as instructor and student, with introductory programming courses with half a dozen different first languages to use for those courses, I think C++ is one of the worst choices! (In my humble opinion, of course) Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python homework

2017-12-13 Thread ROGER GRAYDON CHRISTMAN
the responses I see did attempt to work within the perceived constraints regarding what language tools the student was expected to use. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 171, Issue 7

2017-12-06 Thread ROGER GRAYDON CHRISTMAN
affect on a course grade, product delivery date, customer satisfaction, and job security. So learn how to find the efficient solutions now while you still have instructors around to help you. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 171, Issue 7

2017-12-06 Thread ROGER GRAYDON CHRISTMAN
I think I also came up with 4 as "the most frequent number". It is unclear ot me how you came up with 3.36 as the most common number, because I tried rolling a six-sided die myself several times, and somehow 3.36 didn't come up even once! On Wed, Dec 6, 2017, D'Arcy Cain wrote: > On 12/05/2017

Re: Python-list Digest, Vol 170, Issue 34

2017-11-27 Thread ROGER GRAYDON CHRISTMAN
them. Roger Christman Pennsylvania State University On Mon, Nov 27, 2017 Cai Gengyang wrote: > >Message: 38 >Date: Mon, 27 Nov 2017 04:54:21 -0800 (PST) >From: Cai Gengyang <gengyang...@gmail.com> >Subject: While, If, Count Statements >Message-ID: <b978e7

Re: Python-list Digest, Vol 170, Issue 34

2017-11-27 Thread ROGER GRAYDON CHRISTMAN
that follow them. Roger Christman Pennsylvania State University On Mon, Nov 27, 2017 Cai Gengyang wrote: > >Message: 38 >Date: Mon, 27 Nov 2017 04:54:21 -0800 (PST) >From: Cai Gengyang <gengyang...@gmail.com> >Subject: While, If, Count Statements >Message-ID: <b978e7

Re: Problem in defining multidimensional array matrix and regression

2017-11-19 Thread ROGER GRAYDON CHRISTMAN
I'm thinking that is the first place you should look. You could either modify your data file (with a nice global replace/change) or you could give a different value to one of the default parameters to the functions you use to open the file. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Shoulid constants be introduced to Python?

2017-11-16 Thread ROGER GRAYDON CHRISTMAN
ows these loopholes in with the expectation that the programmer should know better. I think the same thing would be true with constants. If you need this crutch to protect yourself from accidentally clobbering constants, then do better. If you only need it to for documentation purposes, just tweak the documentation. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Ideas about how software should behave

2017-11-09 Thread ROGER GRAYDON CHRISTMAN
s here appear commonly enough to place the spirit of a particular post in the context of their general presentation style. Roger Christman Pennsylvania State University On Thu, Nov 9, 2017, Gregory Ewing wrote:But ideas are not software -- they don't actively *do* anything, so trying to anthropomorp

Re: replacing 'else' with 'then' in 'for' and 'try'

2017-11-06 Thread ROGER GRAYDON CHRISTMAN
that simply removing 'break' from my vocabulary, this whole 'else on a loop' issue completely dissolves. So thank you for, even unintentionally, helping me to feel good about living inside my ivory tower! Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo

FW: Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
memory (all of the data), instead of streamlike. I suppose I did read somewhere about setting a stream option. Roger Christman Pennsylvania State University Forwarded Message Just a quick question on how best to read a remote CSV file. So far, I tried

Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
-8 encoding, but although I find that as an option for a local file (with open()) I did not see that on my first glance at the two functions above. Is there an easy way to read a remove CSV file with utf-8 encoding without copying the whole file locally first? Roger Christman Pennsylvania State

Re: why it append one more letter after decode?

2017-10-30 Thread ROGER GRAYDON CHRISTMAN
t;\\" in one case, and r"\\" in the other case. These are not equal to each other, and naturally would not give equal results from your function. So that leads to the second possibility that you are not calling the function in the same way. In either case, you cannot blame the function for giving you different results if you give it different data. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Coding style in CPython implementation

2017-10-29 Thread ROGER GRAYDON CHRISTMAN
r than Implicit" in the example cited. Roger Christman Pennsylvania State University On Sun, Oct 29, 2017, Setfan Ram wrote: > =?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= <stefanossofroniou...@gmail.com> writes: >>I guess the following parts from "Zen of Pyth

Just a quick question about main()

2017-10-27 Thread ROGER GRAYDON CHRISTMAN
guess I'm not stuck on that habit, since my programming experiences go way back to the old Fortran days Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Save non-pickleable variable?

2017-10-21 Thread ROGER GRAYDON CHRISTMAN
hould also be pickleable. The "Json.org" web site should give you a place to download the modules you would need for each of the two languages. Hope this helps. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

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

2017-10-13 Thread ROGER GRAYDON CHRISTMAN
s directly visible along with the function signature either way. We don't need any annotations or attributes or whatnot if we have the perfectly normal function documentation. Or is that kind of habit no longer practiced in 'the real world'? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 169, Issue 23

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
ction when debugging. Roger Christman Pennsylvania State University On Thu, Oct 12, 2017 12:26 AM, Steve D'Aprano wrote: > > >Message: 3 >Date: Thu, 12 Oct 2017 12:26:07 +1100 >From: Steve D'Aprano <steve+pyt...@pearwood.info> >To: python-list@python.org >Subject: Re:

Re: Python-list Digest, Vol 169, Issue 23

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
one exit. And, unlike goto's and set_jmp() is easiliy incorporated into other control structures depending on where you want to go after any recovery steps. The code that generated the exception, of course, seemingly has more than one exit, but exceptions are just that -- exceptions. I hope you don't start using counting loops up to 2**64 to visit a 100 element array and rely on IndexError to exit such a loop. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: how to replace multiple char from string and substitute new char

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
calls in that one line of code. If you want only one function call and you want to do even more substitutions than just those below, there is another handy functionin the string object that can do so very nicely. What did you try? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

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

2017-10-11 Thread ROGER GRAYDON CHRISTMAN
like that somewhere around this forum. But I like it anyway Roger Christman Pennsylvania State University On Wed, Oct 11, 2017 12:07 PM, Dennis Lee Bieber wrote: > On Wed, 11 Oct 2017 00:21:46 -0400, Bill <bill_nos...@whoknows.net> >declaimed the following: > >>PL-I h

Re: Pedagogical style [was Re: The "loop and a half"]

2017-10-06 Thread ROGER GRAYDON CHRISTMAN
addition, and the rug gets pulled out from under them.There is no visible quantity of 1, 2, or 3 in those circles and diamonds; and probably no 1, 2, or 3 in the children's game either. How is it any surprise that they did not figure out the children's game as quickly? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Introducing the "for" loop

2017-10-06 Thread ROGER GRAYDON CHRISTMAN
do a string translation, using an ugly 12-way if-else construct nested within a loop where a dictionary would very easily trim the if-else and str.translate() would eliminate the loop. (This is fresh in my mind because I plan to illustrate both their solution and mine in my very next class)

Re: Python-list Digest, Vol 169, Issue 7

2017-10-05 Thread ROGER GRAYDON CHRISTMAN
nge, I believe, is the best way to forestall that habit. Oh, and it also steers people from this error I often see: "for i in len(list)" Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
,'z'] AttributeError: 'any' object attribute '__slots__' is read-only Oh, and here's a little thing from the Python 3.6.2 Glossary: __slots__ A declaration inside a class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the

Re: The "loop and a half"

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
keep my course content small and simple. Roger Christman Pennsylvania State University > > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 169, Issue 5

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
t you're joking. So for the humour-impaired: THIS POST WAS A >JOKE. Okay? Good.) > > Gotta watch out for all those Islamic extremists. Somewhere along the line when I wasn't paying attention, they got us all using Arabic numerals. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: when is the filter test applied?

2017-10-03 Thread ROGER GRAYDON CHRISTMAN
terable you are filtering, so anything that removes from your iterable is going to cause you filter so skip something. That can also be fixed by copying the iterable first. Or alternatively, you can go more functional and instead create a new iterable set of data from the old, instead of mutating what you have. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginners and experts

2017-09-30 Thread ROGER GRAYDON CHRISTMAN
that randomly perturb the code instead. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

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

2017-09-27 Thread ROGER GRAYDON CHRISTMAN
rring back to my previous note about what happens when we do "b = c" in the non-Python languages and in Python. >From the ordering of the notes in this forum, I will just assume you did not get a chance to read it before this post I am responding to. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

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

2017-09-26 Thread ROGER GRAYDON CHRISTMAN
ng c has been assigned). But in C++, that statement would be completely invalid -- once you associate a reference to a reference variable, you cannot change the binding. This further emphasizes that the statement "int = a" is not an assignment statement, which means it is rather irrelevant to the semantics of assignment statements. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

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

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
or a reference parameter? Can you replicate this behavior in Pascal without any if statement, since, as you say, the semantics are wholly contained by those of Pascal (aside from the += operator itself not appearing in the Pascal language) Roger Christman Pennsylvania State Universtiy On Mon, Sep 25

Re: python console menu level looping

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
might as well just test using those integers. On the other hand, if you intend to make the code's decisions appear to be self-documenting, then skip the integers completely, and instead use string inputs, like single letters or short keywords. That would then eliminate any worry about ValueEr

Re: [Tutor] beginning to code

2017-09-23 Thread ROGER GRAYDON CHRISTMAN
On Fri, Sep 22, 2017 12:03 PM, Dennis Lee Bier wrote:> On Fri, 22 Sep 2017 23:30:34 +1000, Steve D'Aprano > declaimed the following: > >The exercise is to demonstrate pass by reference semantics. That requires > >demonstrating the same

Re: [Tutor] beginning to code

2017-09-13 Thread ROGER GRAYDON CHRISTMAN
g data. Roger Christman -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple game board GUI framework

2017-09-11 Thread ROGER GRAYDON CHRISTMAN
object whose inventory included several rooms, so as the ship moved, so did everything on board. And there was no GUI required for it -- so no issues there. It's been a couple decades or so, but that interpreted object-oriented language LPC might still be out there somewhere. Roger

Re: A question on modification of a list via a function invocation

2017-09-04 Thread ROGER GRAYDON CHRISTMAN
>Does a poor job AFAIAC of explaining the difference between foo and bar in foll def foo(x): x += 2 def bar(x): x.append(2) a=10 b=[10] foo(a) a >10 bar(b) b >[10, 2] Or with just one function: >>> def baz(x,y): x += y >>> a = 10 >>> b = [10] >>>

Re: Who are the "spacists"?

2017-03-18 Thread ROGER GRAYDON CHRISTMAN
Just a couple minor notes from my experience: 1) Some of the course management software I use doesn't like me typing tab characters. When I want to post sample code into a course page using this software, tabs are either ignored or does something really broken (like post an incomplete file).

[issue29531] Update Doc/README.txt to README.rst

2017-02-15 Thread Roger Sachan
Changes by Roger Sachan <narayanro...@gmail.com>: -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue29531] Update Doc/README.txt to README.rst

2017-02-14 Thread Roger Sachan
Changes by Roger Sachan <narayanro...@gmail.com>: -- pull_requests: +67 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29531> ___

[issue29531] Update Doc/README.txt to README.rst

2017-02-14 Thread Roger Sachan
Changes by Roger Sachan <narayanro...@gmail.com>: -- pull_requests: -31 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29531> ___

[issue29531] Update Doc/README.txt to README.rst

2017-02-11 Thread Roger Sachan
Changes by Roger Sachan <narayanro...@gmail.com>: -- pull_requests: -29 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29531> ___

[issue29531] Update Doc/README.txt to README.rst

2017-02-10 Thread Roger Sachan
Changes by Roger Sachan <narayanro...@gmail.com>: -- pull_requests: +31 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29531> ___

[issue29531] Update Doc/README.txt to README.rst

2017-02-10 Thread Roger Sachan
New submission from Roger Sachan: I have simply updated the document and its references to README.rst (thanks to whoever formatted it). -- assignee: docs@python components: Documentation messages: 287590 nosy: Roger Sachan, docs@python priority: normal pull_requests: 29 severity

Namespace for timeit

2016-10-14 Thread ROGER GRAYDON CHRISTMAN
t tells me the namespace isn't supposed to be a string test.__dict__ is just an empty dictionary so where do I find 'sorter', 'array', and 'size'? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Linear Time Tree Traversal Generator

2016-09-21 Thread ROGER GRAYDON CHRISTMAN
then is no better than a dict in any way, except for maybe some rare operation like "identify the minimal value" Roger Christman instructor Pennsylvania State Universtiy -- https://mail.python.org/mailman/listinfo/python-list

Re: Linear Time Tree Traversal Generator

2016-09-20 Thread ROGER GRAYDON CHRISTMAN
On Tue, Sep 20, 2016 at 9:46 AM, ROGER GRAYDON CHRISTMAN <https://webmail.psu.edu/webmail/retrieve.cgi?mailbox=inbox=CAO1D73Eho37guUZkM6Kk9Nu5WB43oN721G33XGNis0LhSu7xVQ%40mail%2egmail%2ecom=view_num=10800=50=0=4=default_view=1=1=0=20160920201523#;>d...@psu.edu> wrote: >I am tr

Linear Time Tree Traversal Generator

2016-09-20 Thread ROGER GRAYDON CHRISTMAN
squeeze the 'yield node._value' in between them. Is there hope for a linear-time tree-traversal generator, or will I have just have to settle for an n-log-n generator or a linear time behavior with linear extra space? Roger Christman instructor Pennsylvania State University -- https://mail.pyth

Re: Is duck-typing misnamed?

2016-08-27 Thread ROGER GRAYDON CHRISTMAN
like me defining methods __iter__ and __next__ and voila, I've turned something into an iterator by witch -- er.. duck-typing! Perhaps she inherited her weight from her latent duckness. Thoughts? Roger Christman On Sat, Aug 27, 2016 06:27 PM, python-list@python.org wrote: > On 26Aug2016 19

Is duck-typing misnamed?

2016-08-27 Thread ROGER GRAYDON CHRISTMAN
ultimately, the duck does come into play, since the witch weighs the same as a duck. Roger Christman Electrical Engineering and Computer Science Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

[issue26504] tclErr: invalid command name "PyAggImagePhoto"

2016-03-09 Thread Roger Mosher
Roger Mosher added the comment: It appears to be a problem with the Anaconda 3 distribution. See: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/xssOnleIPFw for a discussion. -- status: open -> closed ___ Python tracker &

[issue26504] tclErr: invalid command name "PyAggImagePhoto"

2016-03-07 Thread Roger Mosher
New submission from Roger Mosher: when trying to show a FigureCanvasTkAgg the program crashes. Debugging eventually leads me to TkAgg.blit method where we find the following line: tk.call( "PyAggImagePhoto", photoimage, id(data), colormode, id(

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-25 Thread Roger Cook
Roger Cook added the comment: Installing a VM and running it there, it installs. Is there a manual removal procedure to follow when the automated uninstall fails? -- resolution: -> not a bug status: open -> closed ___ Python tracke

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-22 Thread Roger Cook
New submission from Roger Cook: The Windows installer stops the installation and backs out on a clean system. Here is the relevant section of the log file (msiexec /i python-2.7.11.amd64.msi /l*v): MSI (s) (14:90) [15:13:32:577]: Executing op: ActionStart(Name=RemovePip,,) Action 15:13:32

Re: Pipes

2015-08-10 Thread Roger Hunter
I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortran and TrueBasic on mainframes. I'd like programming to be more like holding a discussion to the computer in English instead of Sanscrit. Roger On Sun, Aug 9

  1   2   3   4   5   6   7   8   9   10   >