Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-17 Thread Xah Lee
On Jun 17, 2:26 pm, Dotan Cohen wrote: > On Fri, Jun 17, 2011 at 20:43, Xah Lee wrote: > > u r aware that there are already tens of layouts, each created by > > programer, thinking that they can create the best layout? > > Yes. Mine is better :) > Had Stallman not heard

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-18 Thread Xah Lee
On Jun 18, 4:06 am, Dotan Cohen wrote: > On Sat, Jun 18, 2011 at 01:09, Xah Lee wrote: > > thanks. didn't know about Ducky keyboard. Looks good. Also nice to > > hear your experience about Truly Ergonomic keyboard. > > I like it, see my first-hour review > here:htt

[ANNC] pynguin-0.10 python turtle graphics application

2011-06-25 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

what is the airspeed velocity of an unladen swallow

2011-06-28 Thread Xah Lee
this will be of interest to those bleeding-edge pythoners. “what… is the airspeed velocity of an unladen swallow?” xahlee.org/funny/unladen_swallow.html Xah -- http://mail.python.org/mailman/listinfo/python-list

emacs lisp text processing example (html5 figure/figcaption)

2011-07-03 Thread Xah Lee
llows. -- Emacs Lisp: Processing HTML: Transform Tags to HTML5 “figure” and “figcaption” Tags Xah Lee, 2011-07-03 Another triumph of using elisp for text processing over perl/python. The Problem -- Summary I want batch tran

Re: emacs lisp text processing example (html5 figure/figcaption)

2011-07-05 Thread Xah Lee
On Jul 4, 12:13 pm, "S.Mandl" wrote: > Nice. I guess that XSLT would be another (the official) approach for > such a task. > Is there an XSLT-engine for Emacs? > > -- Stefan haven't used XSLT, and don't know if there's one in emacs... it'd be nice if someone actually give a example... Xah --

Re: emacs lisp text processing example (html5 figure/figcaption)

2011-07-05 Thread Xah Lee
On Jul 5, 12:17 pm, Ian Kelly wrote: > On Mon, Jul 4, 2011 at 12:36 AM, Xah Lee wrote: > > So, a solution by regex is out. > > Actually, none of the complications you listed appear to exclude > regexes.  Here's a possible (untested) solution: > > >

Re: emacs lisp text processing example (html5 figure/figcaption)

2011-07-05 Thread Xah Lee
On Jul 5, 12:17 pm, Ian Kelly wrote: > On Mon, Jul 4, 2011 at 12:36 AM, Xah Lee wrote: > > So, a solution by regex is out. > > Actually, none of the complications you listed appear to exclude > regexes.  Here's a possible (untested) solution: > > >

Re: Lisp refactoring puzzle

2011-07-11 Thread Xah Lee
2011-07-11 On Jul 11, 6:51 am, jvt wrote: > I might as well toss my two cents in here.  Xah, I don't believe that > the functional programming idiom demands that we construct our entire > program out of compositions and other combinators without ever naming > anything.  That is much more the pro

What Programing Language are the Largest Website Written In?

2011-07-12 Thread Xah Lee
maybe this will be of interest. 〈What Programing Language Are the Largest Website Written In?〉 http://xahlee.org/comp/website_lang_popularity.html - i don't remember how, but today i suddenly got reminded that Facebook is written in PHP. So, on the spur of the mo

Re: Python threading/multiprocessing issue.

2011-07-15 Thread Lee Harr
> I'm working on a tool that runs a number of process is separate thread. > I've, up to this point, been using threading.Thread, but from what I > read multiprocess will allow multiple processors to be used >  From the python docs on multiprocessing. > leverage multiple processors on a giv

a little parsing challenge ☺

2011-07-17 Thread Xah Lee
2011-07-16 folks, this one will be interesting one. the problem is to write a script that can check a dir of text files (and all subdirs) and reports if a file has any mismatched matching brackets. • The files will be utf-8 encoded (unix style line ending). • If a file has mismatched matching-p

Re: a little parsing challenge ☺

2011-07-18 Thread Xah Lee
On Jul 17, 12:47 am, Xah Lee wrote: > 2011-07-16 > > folks, this one will be interesting one. > > the problem is to write a script that can check a dir of text files > (and all subdirs) and reports if a file has any mismatched matching > brackets. > … Ok, here's

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Jul 18, 7:07 pm, Billy Mays wrote: > On 7/18/2011 7:56 PM, Steven D'Aprano wrote: > > > > > > > > > > > Billy Mays wrote: > > >> On 07/17/2011 03:47 AM, Xah Lee wrote: > >>> 2011-07-16 > > >> I gave it a shot.  It doe

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote: > On Jul 17, 12:47 am, Xah Lee wrote: > > i hope you'll participate. Just post solution here. Thanks. > > http://pastebin.com/7hU20NNL just installed py3. there seems to be a bug. in this file http://xahle

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Jul 18, 10:12 am, Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> wrote: > On 07/17/2011 03:47 AM,XahLee wrote: > > > 2011-07-16 > > I gave it a shot.  It doesn't do any of the Unicode delims, because > let's face it, Unicode is for goobers. > > import sys, os > > pair

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Jul 18, 2:59 pm, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > > Billy Mays wrote: > >> I gave it a shot.  It doesn't do any of the Unicode delims, because let's > >> face it, Unicode is for goobers. > > > Uh, okay... > > > Your script also misses the requirement of outputting the inde

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Jul 17, 8:31 am, Thomas Jollans wrote: > On Jul 17, 9:47 am,XahLee wrote: > > > > > > > > > > > 2011-07-16 > > > folks, this one will be interesting one. > > > the problem is to write a script that can check a dir of text files > > (and all subdirs) and reports if a file has any mismatched mat

Re: a little parsing challenge ☺

2011-07-19 Thread Xah Lee
On Jul 19, 10:33 am, Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> wrote: > On 07/19/2011 01:14 PM,XahLee wrote: > > > I added other unicode brackets to your list of brackets, but it seems > > your code still fail to catch a file that has mismatched curly quotes. > > (e.

Re: a little parsing challenge ☺

2011-07-20 Thread Xah Lee
pt to Validate Matching Brackets Xah Lee, 2011-07-19 This page shows you how to write a elisp script that checks thousands of files for mismatched brackets. The Problem Summary I h

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 19, 11:14 am, Thomas Jollans wrote: > I thought I'd have some fun with multi-processing: Nice joke. ☺ > Here's a sane version: > > https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e hi thomas, i still cant get your code to work. I have a dir named xxdir with a sing

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 19, 11:07 am, Thomas Jollans wrote: > On 19/07/11 18:54, Xah Lee wrote: > > > > > > > > > > > On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote: > >> On Jul 17, 12:47 am, Xah Lee wrote: > >>> i hope you&#x

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
2011-07-21 On Jul 18, 12:09 am, Rouslan Korneychuk wrote: > I don't know why, but I just had to try it (even though I don't usually > use Perl and had to look up a lot of stuff). I came up with this: > > /(?| >      (\()(?&matched)([\}\]”›»】〉》」』]|$) | >      (\{)(?&matched)([\)\]”›»】〉》」』]|$) | >

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
suggestion of ideas. i haven't done extensive testing on my own code neither. I'll revisit maybe in a few days. Feel free to grab my report and make it nice. If you would like to fix your code, feel free to email. Xah On Jul 21, 7:26 am, Ian Kelly wrote: > On Thu, Jul 21

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 21, 9:43 am, pyt...@bdurham.com wrote: > Xah, > > 1. Is the following string considered legal? > > [ { ( ] ) } > > Note: Each type of brace opens and closes in the proper sequence. But > inter-brace opening and closing does not make sense. nu! > Or must a closing brace always balance out

Re: turtles slowing down

2011-07-21 Thread Lee Harr
>  there > was a steady slowing down of turtles as time goes The problem is that when the turtle "draws" it does not just put marks on the canvas, it actually creates new canvas items. Canvas items aren't just pixels on the canvas, they are full-fledged objects which (if you wanted to) you could

Re: What Programing Language are the Largest Website Written In?

2011-08-02 Thread Xah Lee
On Jul 31, 11:38 am, gavino wrote: > On Jul 13, 1:04 pm, ccc31807 wrote: > > > > > > > > > > > On Jul 12, 7:54 am, Xah Lee wrote: > > > > maybe this will be of interest. > > > > 〈What Programing Language Are t

parsing function parameters

2011-08-03 Thread Lee Harr
I am trying to get some information about a function before (and without) calling it. Here is what I have so far. I chose to go with a regular expression, so now I have 2 problems :o) def pdict(f, pstr):     '''given a function object and a string with the function parameters,     return a dic

RE: parsing function parameters

2011-08-03 Thread Lee Harr
>> I am trying to get some information about a function >> before (and without) calling it. > how about def pdict(f):     parameter_defaults = {}     defaults = f.func_defaults     defaultcount = len(defaults)     argcount = f.func_code.co_argcount     for i in xrange(f.func_code.co_argco

RE: parsing function parameters

2011-08-03 Thread Lee Harr
Needed to make one change... for functions with no default args: def pdict(f):     parameter_defaults = {}     defaults = f.func_defaults     if defaults is not None:     defaultcount = len(defaults)     else:     defaultcount = 0     argcount = f.func_code.co_argcount     for i in xrang

[ANNC] pynguin-0.11 python turtle graphics application

2011-08-10 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

Re: Problems of Symbol Congestion in Computer Languages

2011-02-28 Thread Xah Lee
On Feb 28, 7:30 pm, rusi wrote: > On Feb 28, 11:39 pm, Dotan Cohen wrote: > > > You miss the canonical bad character reuse case: = vs ==. > > > Had there been more meta keys, it might be nice to have a symbol for > > each key on the keyboard. I personally have experimented with putting > > the sy

Re: Problems of Symbol Congestion in Computer Languages

2011-03-05 Thread Xah Lee
On Mar 1, 3:40 pm, Chris Jones wrote: > At first it looks like something MS (Morgan Stanley..) dumped into the > OSS lap fifteen years ago and nobody ever used it or maintained it.. so > it takes a bit of digging to make it.. sort of work in current GNU/linux > distributions.. especially since it

force --install-layout=deb on systems where that makes sense?

2011-04-19 Thread Lee Harr
Is there a way to make distutils use --install-layout=deb but only on systems where that makes sense? I just noticed that if someone installs without that switch, my app will not be able to find its data files, because sys.prefix = /usr  but the installation is actually in to /usr/local I suppo

English Idiom in Unix: Directory Recursively

2011-05-17 Thread Xah Lee
might be of interest. 〈English Idiom in Unix: Directory Recursively〉 http://xahlee.org/comp/idiom_directory_recursively.html -- English Idiom in Unix: Directory Recursively Xah Lee, 2011-05-17 Today, let's discuss something in the category of lingu

Re: Abandoning Python

2011-05-22 Thread John Lee
Bill Allen gmail.com> writes: > You have ideas, a text editor, and a computer - best get to coding. > What's stopping you? You largely want Python, with modifications. > Join the development team and help implement those changes, or fork > your own flavor and do what you wish. Right? You imag

Re: Abandoning Python

2011-05-22 Thread John Lee
Dan Stromberg gmail.com> writes: > On Sat, May 21, 2011 at 8:49 AM, John J Lee pobox.com> wrote: > > I still like Python after using it for over a decade, but there are > things I don't like. > What are your favourite up-and-coming languages of the moment? > Here

Re: List of WindowsError error codes and meanings

2011-05-22 Thread John Lee
Genstein invalid.invalid> writes: > > > Andrew Berg gmail.com> writes: > > Since Python 2.5, the errno attribute maps the Windows error to error > > codes that match the attributes of module errno. > > Good point, I completely misread that. At least the Windows error code > is still available

Re: Abandoning Python

2011-05-22 Thread John Lee
Stefan Behnel behnel.de> writes: > > John J Lee, 22.05.2011 17:58: > > Daniel Kluev writes: > >> Also, most of these complaints could be solved by using correct python > >> dialect for particular task - RPython, Cython and so on. > > > > Diffe

Re: English Idiom in Unix: Directory Recursively

2011-05-22 Thread Xah Lee
Xah wrote: «In the emacs case: “Recursive delete of xx? (y or n) ”, what could it possibly mean by the word “recursive” there? Like, it might delete the directory but not delete all files in it? » Jonathan de Boyne Pollard wrote: > It might *try* to delete the directory but not any of its contents

Re: Abandoning Python

2011-05-22 Thread John Lee
Dan Stromberg gmail.com> writes: [...] > Pylint does type inferencing - I find it very valuable on large projects, and > even some not-so-large projects.I doubt Pylint's been integrated into any > IDE's, [...] That's interesting, thanks. I see this is a different pylint than the old logilab py

Re: Abandoning Python

2011-05-22 Thread John Lee
Ed Keith yahoo.com> writes: > > Have you looked at Falcon (http://www.falconpl.org/)? It seems to have a lot > of what you are looking for. I'm more interested in other people's opinions than my own "looking for"s. What *should* I be looking for (other than Python itself)? What's interesting,

Re: Abandoning Python

2011-05-22 Thread John Lee
John Lee pobox.com> writes: [...] > That's interesting, thanks. I see this is a different pylint than the old > logilab pylint. Unfortunate choice of name, since it makes it hard to find > IDE integration work that's already done. Hmm, I see the last release was in 2003

Functional Programing: stop using recursion, cons. Use map & vectors

2011-05-22 Thread Xah Lee
this is important but i think most lispers and functional programers still don't know it. Functional Programing: stop using recursion, cons. Use map & vectors. 〈Guy Steele on Parallel Programing〉 http://xahlee.org/comp/Guy_Steele_parallel_computing.html btw, lists (as cons, car, cdr) in the lis

Re: English Idiom in Unix: Directory Recursively

2011-05-22 Thread Xah Lee
On May 22, 3:46 pm, Chris Angelico wrote: > On Mon, May 23, 2011 at 6:22 AM, Xah Lee wrote: > > Xah wrote: > > «In the emacs case: “Recursive delete of xx? (y or n) ”, what could it > > possibly mean by the word “recursive” there? Like, it might delete the > > directo

Re: English Idiom in Unix: Directory Recursively

2011-05-23 Thread Xah Lee
On May 22, 4:32 pm, Chris Angelico wrote: > On Mon, May 23, 2011 at 9:17 AM, Xah Lee wrote: > > the context is this: In emacs directory manager (aka dired), when you > > call dired-do-delete on a directory, emacs prompts, this way: > > “Recursive delete of xx? (y or n)” >

Re: English Idiom in Unix: Directory Recursively

2011-05-24 Thread Xah Lee
On May 23, 9:28 pm, Chris Angelico wrote: > On Tue, May 24, 2011 at 2:20 PM, Xah Lee wrote: > > why don't you file a bug report? In GNU Emacs 23.2, it's under the > > Help menu. I suppose it's the same in other emacs distro. > > Because I do not consider its b

Re: English Idiom in Unix: Directory Recursively

2011-05-24 Thread Xah Lee
On May 24, 3:06 pm, Rikishi42 wrote: > On 2011-05-24, Steven D'Aprano wrote: > > >>> I think that is a patronizing remark that under-estimates the > >>> intelligence of lay people and over-estimates the difficulty of > >>> understanding recursion. > > >> Why would you presume this to be related t

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Xah Lee
On May 25, 12:26 am, Thorsten Kampe wrote: > * Rikishi42 (Wed, 25 May 2011 00:06:06 +0200) > > > > > > > > > > > > > On 2011-05-24, Steven D'Aprano wrote: > > >>> I think that is a patronizing remark that under-estimates the > > >>> intelligence of lay people and over-estimates the difficulty of

Re: English Idiom in Unix: Directory Recursively

2011-05-26 Thread Xah Lee
On May 26, 4:20 am, Thorsten Kampe wrote: > Did your mom tell you to "recursively clean up your room"?. that had me L O L! i think i'll quote in my unix hating blogs sometimes, if you don't mind. ☺ Xah -- http://mail.python.org/mailman/listinfo/python-list

Tkinter not working

2022-08-01 Thread Daniel Lee
Hello, I my code with tkinter was working before, and now, it has many errors in it. I’m not sure what has happened. The results after running are below: "D:\Python Projects\tes\venv\Scripts\python.exe" "D:/Python Projects/tes/main.py" Traceback (most recent call last): File "D:\Python Project

回复: Problem using cx_Freeze > auto-py-to-exe

2022-08-19 Thread Daniel Lee
Thank you so much, I really appreciate it. 发件人: Chris Angelico 发送时间: 2022年8月19日 8:39 收件人: python-list@python.org 主题: Re: Problem using cx_Freeze > auto-py-to-exe On Fri, 19 Aug 2022 at 10:07, Grant Edwards wrote: > > On 2022-08-18, Chris An

回复: setup.py + cython == chicken and the egg problem

2022-08-19 Thread Daniel Lee
Thank you! 从 Windows 版邮件发送 发件人: Dan Stromberg 发送时间: 2022年8月19日 8:35 收件人: Python List 主题: Re: setup.py + cython == chicken and the egg problem On Tue, Aug 16, 2022 at 2:03 PM Dan Stromberg

回复: Problem using cx_Freeze

2022-08-19 Thread Daniel Lee
Thank you! 发件人: subin 发送时间: 2022年8月19日 8:02 收件人: python-list@python.org 主题: Re: Problem using cx_Freeze Hope you had a good time. On Wed, Aug 17, 2022 at 10:19 PM Peter J. Holzer wrote: > On 2022-08-17 12:09:14 -0600, David at Booom

回复: UTF-8 and latin1

2022-08-19 Thread Daniel Lee
Thanks! 发件人: Stefan Ram 发送时间: 2022年8月19日 6:23 收件人: python-list@python.org 主题: Re: UTF-8 and latin1 Tobiah writes: > When a person enters >Montréal, Quebéc into a form field, what are they >doing on the ke

Python scripts in .exe form

2022-08-19 Thread Mona Lee
I'm pretty new to Python, and I had to do some tinkering because I was running into issues with trying to download a package from PIP and must've caused some issues in my program that I don't know how to fix 1. It started when I was unable to update PIP to the newest version because of some "Un

Re: Python scripts in .exe form

2022-08-22 Thread Mona Lee
folder when you run them. You’ll be able to get the > scripts from there. > > Sent from my iPhone > > > On Aug 19, 2022, at 9:51 PM, Mona Lee wrote: > > > > I'm pretty new to Python, and I had to do some tinkering because I was > > running into i

Re: A 35mm film camera represented in Python object

2021-03-18 Thread Lee Congdon
Note also 36 exposure film. -- Film - Speed: 100 ISO Rewound into cartridge: False Exposed frames: 0 (of 24) Ruined: False On Sun, Mar 7, 2021 at 5:20 AM D.M. Procida < real-not-anti-

Re: Mutually exclusive options with argparse.

2021-09-01 Thread Lee Congdon
Does a mutually exclusive group, as described in "Mutual exclusion" at https://docs.python.org/3/library/argparse.html meet your needs? On Wed, Sep 1, 2021 at 9:48 AM hongy...@gmail.com wrote: > See the following code snippets [1] for implementation of the exclusive > options with argparse: > >

GeneratorExit masks StopIteration?

2017-01-29 Thread inyeol . lee
Does generator.close() prevent raising StopIteration? I'm trying to get the return value from coroutine after terminating it. Here is simple test code: $ python3 Python 3.6.0 (default, Dec 23 2016, 12:50:55) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin Type "help", "copyrig

Re: GeneratorExit masks StopIteration?

2017-01-29 Thread inyeol . lee
On Sunday, January 29, 2017 at 9:54:44 PM UTC-8, Chris Angelico wrote: > ... > When you close() a generator, it raises GeneratorExit into it, and > then silences any StopIteration or GeneratorExit that comes out of it. Chris, Thanks for the info. Is this (GenExit silencing StopIteration) documente

Re: GeneratorExit masks StopIteration?

2017-01-29 Thread inyeol . lee
On Sunday, January 29, 2017 at 10:47:09 PM UTC-8, Chris Angelico wrote: > On Mon, Jan 30, 2017 at 5:38 PM, wrote: > > On Sunday, January 29, 2017 at 9:54:44 PM UTC-8, Chris Angelico wrote: > >> ... > >> When you close() a generator, it raises GeneratorExit into it, and > >> then silences any Stop

leetv 1.12 released

2018-05-30 Thread Jim Lee
edule, or to add a few more commercials that I found on YouTube, but that's it. I don't even have to stop or restart anything. It works so well that I added a wireless HDMI transmitter so that the signal is available on any TV in the house! --- Thanks for reading, --Jim Lee -- https://mail.python.org/mailman/listinfo/python-list

tkinter (ttk) combobox dropdown text is white on white

2018-06-03 Thread Jim Lee
he combobox itself, but I cannot figure out how to alter the appearance of entries in the dropdown list. Any pointers? Thanks, -Jim Lee -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-04 Thread Jim Lee
Oops, I hit "reply" instead of "reply-list" last time.  Trying again... On 06/03/2018 02:01 PM, Christian Gollwitzer wrote: Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk from tkinter import ttk root = tk.Tk() cb = ttk.Combobox(root) cb.grid(row=0, colu

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-05 Thread Jim Lee
On 06/05/2018 12:21 AM, Peter Otten wrote: Jim Lee wrote: Oops, I hit "reply" instead of "reply-list" last time. Trying again... On 06/03/2018 02:01 PM, Christian Gollwitzer wrote: Am 03.06.18 um 21:54 schrieb Jim Lee:> import tkinter as tk from tkinter import

Re: site package does not work

2018-06-06 Thread Jim Lee
On 06/05/2018 01:33 PM, Erik Martinson via Python-list wrote: I am trying to dynamically add a site-package to a script that is run as a cron job. The method adduseristepackages does not seem to do anything. import sys import site print('-')print(site.getusersitepackag

Re: How to install matplotlib in Debian 9

2018-06-08 Thread Jim Lee
On 06/08/2018 11:54 AM, Markos wrote: Hi, I'm starting my studies with Python 3 on Debian 9 that I just installed. I have to install the matplotlib module, but I am in doubt what is the difference of the commands: pip3 install matplotlib or apt-get install python3-matplotlib Is there any

Re: Problem finding my folder via terminal

2018-06-09 Thread Lee Congdon
thon.org/mailman/listinfo/python-list > Assuming your account has administrator rights on your Mac, enter the password you use to sign on. If not, or you don't use a password to sign on, see https://support.apple.com/en-us/HT202035 -- Lee -- https://mail.python.org/mailman/listinfo/python-list

Re: mutable sequences

2018-06-13 Thread Jim Lee
On 06/13/2018 07:56 PM, Sharan Basappa wrote: The term mutable appears quite often in Python. Can anyone explain what is meant by mutable and immutable sequences. Mutable means changeable, and immutible means not mutable, or unchangeable. For example, Python lists are mutable. BTW, is the be

Re: Django-hotsauce 1.0 LTS (Commercial Edition) now available for preorder!!

2018-06-13 Thread Jim Lee
I haven't purchased commercial software in decades, so I'm not up on the prevailing business model, but I have to ask: Why would anyone purchase software and then agree to wait 14 weeks for it to be delivered?  I can see that model for hardware, where material resources are limited and a finit

Re: Django-hotsauce 1.0 LTS (Commercial Edition) now available for preorder!!

2018-06-14 Thread Jim Lee
On 06/13/2018 11:38 PM, Chris Angelico wrote: On Thu, Jun 14, 2018 at 11:07 AM, Jim Lee wrote: I haven't purchased commercial software in decades, so I'm not up on the prevailing business model, but I have to ask: Why would anyone purchase software and then agree to wait 14 weeks

Re: Python list vs google group

2018-06-15 Thread Jim Lee
On 06/15/2018 05:00 PM, Chris Angelico wrote: On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi wrote: On 06/15/2018 11:44 AM, Larry Martell wrote: My favorite acronym of all time is TWAIN Really? I always thought it didn't scan. Having spent way WAY too many hours trying to turn documents int

Re: Python list vs google group

2018-06-15 Thread Jim Lee
On 06/15/2018 07:08 PM, Richard Damon wrote: On 6/15/18 9:00 PM, Jim Lee wrote: On 06/15/2018 05:00 PM, Chris Angelico wrote: On Sat, Jun 16, 2018 at 4:52 AM, Rob Gaddi wrote: On 06/15/2018 11:44 AM, Larry Martell wrote: My favorite acronym of all time is TWAIN Really?  I always

Re: Python list vs google group

2018-06-16 Thread Jim Lee
On 06/16/2018 08:36 AM, Richard Damon wrote: On 6/15/18 11:07 PM, Jim Lee wrote: [snip] I once had a Mustek color scanner that came with a TWAIN driver.  If the room temperature was above 80 degrees F, it would scan in color - otherwise, only black & white.  I was *sure* it was a hard

Re: Python list vs google group

2018-06-16 Thread Jim Lee
On 06/16/2018 12:38 PM, Rick Johnson wrote: On Friday, June 15, 2018 at 9:14:13 PM UTC-5, Richard Damon wrote: if the Windows driver broke some specification but still sort of worked [...] ...that's when the engineers in the Redmond, WA area know it's time to package and ship the product!

Re: syntax difference

2018-06-16 Thread Jim Lee
On 06/16/2018 10:13 PM, Sharan Basappa wrote: I think I am now confused with format options in Python. I tried an example as below and both print proper value: age = 35 print "age is %s" % age print "age is %d" % age %run "D:/Projects/Initiatives/machine learning/programs/six.py" age is 35 a

Re: Why an object changes its "address" between adjacent calls?

2018-06-17 Thread Jim Lee
On 06/17/2018 12:08 AM, Jach Fong wrote: C:\Python34\Doc>py Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter as tk >>> root = tk.Tk() >>> tk.Label(root, text

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 11:10 AM, Rick Johnson wrote: Steven D'Aprano wrote: Bart Wrote: So what's a Type Hint associated with in Python? Since it is a type *hint*, not a type *declaration*, the interpreter can and does ignore it. But yet, the _programmer_ cannot ignore it. Does that make any sense

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 01:35 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 6:23 AM, Marko Rauhamaa wrote: Jim Lee : IMHO, trying to shoehorn static type checking on top of a dynamically typed language shows that the wrong language was chosen for the job. I'm also saddened by the type hi

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 01:56 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 6:50 AM, Jim Lee wrote: On 06/17/2018 01:35 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 6:23 AM, Marko Rauhamaa wrote: Jim Lee : IMHO, trying to shoehorn static type checking on top of a dynamically typed

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 02:17 PM, Chris Angelico wrote: [snip] My apologies, stuff wrapped and I misread as I skimmed back. You were the one who used the word "shoehorned". In the same way, that sounds like you already knew the language, and then someone added extra features that don't fit. It's not shoe

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 05:39 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 10:22 AM, Jim Lee wrote: On 06/17/2018 02:17 PM, Chris Angelico wrote: [snip] My apologies, stuff wrapped and I misread as I skimmed back. You were the one who used the word "shoehorned". In the same way, t

Re: syntax difference

2018-06-17 Thread Jim Lee
On 06/17/2018 10:04 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 2:59 PM, Jim Lee wrote: On 06/17/2018 05:39 PM, Chris Angelico wrote: On Mon, Jun 18, 2018 at 10:22 AM, Jim Lee wrote: On 06/17/2018 02:17 PM, Chris Angelico wrote: [snip] My apologies, stuff wrapped and I misread as

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course.  And, I use linting tools and other forms of static type checking.  What I don't like is adding the *syntax* for static type checkin

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 10:46 AM, Chris Angelico wrote: On Tue, Jun 19, 2018 at 3:34 AM, Jim Lee wrote: On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course. And, I use linting tool

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:01 AM, Ian Kelly wrote: On Mon, Jun 18, 2018 at 11:39 AM Jim Lee wrote: On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course. And, I use linting tools and

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:18 AM, Chris Angelico wrote: What, fundamentally, is the difference between type hints and assertions, such that - in your view - one gets syntax and the other is just comments? Type hints are just that - hints.  They have no syntactic meaning to the parser, and do not affect

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:49 AM, Chris Angelico wrote: On Tue, Jun 19, 2018 at 4:34 AM, Jim Lee wrote: On 06/18/2018 11:18 AM, Chris Angelico wrote: What, fundamentally, is the difference between type hints and assertions, such that - in your view - one gets syntax and the other is just comments

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 12:52 PM, Rhodri James wrote: On 18/06/18 19:34, Jim Lee wrote: Type hints are just that - hints.  They have no syntactic meaning to the parser, This is plainly not true, otherwise the parser would be throwing syntax errors at you all the time.  Whether they have semantic

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 02:36 PM, Schachner, Joseph wrote: Now that you know that 1) You are not required to modify your source code at all, even if you want to get full utility from typing, and 2) you really don't have use typing at all, nothing forces you to, and 3) it's been developed by the Pytho

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Jim Lee
On 06/18/2018 04:09 PM, Gregory Ewing wrote: Peter Otten wrote: "folk etymology" would be the retrofitting of the exotic "Schottky" into two familiar words "shot" and "key". Sometimes the writer assumes that these words are somehow related to the labeled object. Well, there is a thing call

Re: Is it possible to call a class but without a new instance created?

2018-06-19 Thread Jim Lee
On 06/18/2018 09:22 PM, Jach Fong wrote: Ben Finney at 2018/6/19 PM 10:20 wrote: Jach Fong writes: Although it passed the first examination, I have no idea if it can work correctly in the real application:-) Neither do I. What is the real-world problem you are trying to solve? Why do you

Re: syntax difference

2018-06-19 Thread Jim Lee
On 06/19/2018 04:13 AM, Ed Kellett wrote: I think we're all--still--missing the larger point that "easy to remove" is a completely stupid metric for judging language features. Seriously. Not a little bit stupid. Not if you think of the feature as analogous to cancer. -Jim -- https://mail.py

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Jim Lee
On 06/23/2018 10:03 PM, Steven D'Aprano wrote: I'd like to run a quick survey. There is no right or wrong answer, since this is about your EXPECTATIONS, not what Python actually does. Given this function: def test(): a = 1 b = 2 result = [value for key, value in locals().item

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Jim Lee
On 06/23/2018 11:02 PM, Chris Angelico wrote: On Sun, Jun 24, 2018 at 3:44 PM, Jim Lee wrote: On 06/23/2018 10:03 PM, Steven D'Aprano wrote: I'd like to run a quick survey. There is no right or wrong answer, since this is about your EXPECTATIONS, not what Python actually does.

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-23 Thread Jim Lee
On 06/23/2018 11:16 PM, Chris Angelico wrote: On Sun, Jun 24, 2018 at 4:08 PM, Jim Lee wrote: There are three locals: a, b, and result. Since result cannot be assigned a value until the list comp has been evaluated, I would expect the comp to return a value of "None" for r

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Jim Lee
On 06/24/2018 04:35 AM, Steven D'Aprano wrote: Indeed. That's one of the beauties of Python -- even when there's an advanced way to do it, there's generally a simple way too. What happened to the Python maxim "There should be one—and preferably only one—obvious way to do it"? -Jim -- http

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-25 Thread Jim Lee
From: Jim Lee On 06/23/2018 11:16 PM, Chris Angelico wrote: > On Sun, Jun 24, 2018 at 4:08 PM, Jim Lee wrote: >> There are three locals: a, b, and result. Since result cannot be assigned >> a value until the list comp has been evaluated, I would expect the comp to >> re

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-25 Thread Jim Lee
From: Jim Lee On 06/23/2018 10:03 PM, Steven D'Aprano wrote: > I'd like to run a quick survey. There is no right or wrong answer, since > this is about your EXPECTATIONS, not what Python actually does. > > Given this function: > > > def test(): > a = 1 &

<    1   2   3   4   5   6   7   8   9   10   >