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

2017-10-07 Thread Richard Damon
On 10/4/17 11:22 PM, Steve D'Aprano wrote: The A and E in the word "are" are not vowels, since they are silent. The A is clearly not silent, unless you have some strange pronunciation. The fact that are is pronounced just like the NAME of the letter R doesn't mean it is silent. Compare the

Re: django project avoid reload page where work algorithm

2017-10-08 Thread Richard Damon
On 10/8/17 11:58 AM, Xristos Xristoou wrote: Τη Κυριακή, 8 Οκτωβρίου 2017 - 6:35:28 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: On 2017-10-08 15:27, Xristos Xristoou wrote: Do you mean "long reload"? user can put some numbers in my html template and i take that numbers and i sue it in specific math

Re: django project avoid reload page where work algorithm

2017-10-08 Thread Richard Damon
On 10/8/17 4:46 PM, Xristos Xristoou wrote: Τη Κυριακή, 8 Οκτωβρίου 2017 - 10:48:38 μ.μ. UTC+3, ο χρήστης Richard Damon έγραψε: On 10/8/17 11:58 AM, Xristos Xristoou wrote: Τη Κυριακή, 8 Οκτωβρίου 2017 - 6:35:28 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: On 2017-10-08 15:27, Xristos Xristoou wrote

Re: Compression of random binary data

2017-10-24 Thread Richard Damon
On 10/24/17 6:30 PM, Steve D'Aprano wrote: On Wed, 25 Oct 2017 07:09 am, Peter J. Holzer wrote: On 2017-10-23 04:21, Steve D'Aprano wrote: On Mon, 23 Oct 2017 02:29 pm, Stefan Ram wrote: If the probability of certain codes (either single codes, or sequences of codes) are non-equal, then yo

Re: Student can't get if elif final statement to print for discussion post for python

2017-11-19 Thread Richard Damon
get a puppy." Why does one path print and the other return, those are different actions. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
es 0x80 and above as being acceptable in identifiers, with the documented warning that the current implementation allows some forms that may generate errors in the future. If enough interest is shown, adding better classification shouldn't be that hard. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
On 11/23/17 4:31 PM, Chris Angelico wrote: On Fri, Nov 24, 2017 at 8:19 AM, Richard Damon wrote: On 11/23/17 2:46 PM, Thomas Jollans wrote: On 23/11/17 19:42, Mikhail V wrote: I mean for a real practical situation - for example for an average Python programmer or someone who seeks a

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Richard Damon
On 11/23/17 5:45 PM, Thomas Jollans wrote: On 23/11/17 23:15, Richard Damon wrote: My thought is you define a legal only those Unicode characters that via the defined classification would be normally legal, but perhaps the first implementation doesn't diagnose many of the illegal combina

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-24 Thread Richard Damon
e sensitive, we already have the issue with the distinction between space and tab, which isn't normally obvious in many text editors (Though I suspect many Python programmers have their editors configured to largely avoid the issue). -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Increasing the diversity of people who write Python

2017-11-24 Thread Richard Damon
he new mapping, and how to touch type on that keyboard. Generally you can also get Keyboard Stickers to place on your keyboard if you are a hunt and pecker typist. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-24 Thread Richard Damon
make your code harder to read, if your font doesn't make enough of a distinction between those characters -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-24 Thread Richard Damon
On 11/24/17 5:46 PM, Ned Batchelder wrote: On 11/24/17 5:26 PM, Richard Damon wrote: Have you tried using U+2010 (HYPHEN) ‐. It is in the class XID_CONTINUE (in fact it is in XID_START) so should be available. U+2010 isn't allowed in Python 3 identifiers. The rules for identifiers are

Re: What is the meaning of @@?

2017-12-24 Thread Richard Damon
s inside a triple quoted string, so this is just part of a multi-line string. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Richard Damon
ch of the 'facts' that I learned in school, there has been a lot of use for the basic methods that were learned while processing those facts in school. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Re: has sourceforge exposed the dirty little secret ?

2018-01-07 Thread Richard Damon
On 1/7/18 5:27 PM, Gene Heskett wrote: On Sunday 07 January 2018 16:22:57 Christian Gollwitzer wrote: Am 05.01.18 um 22:15 schrieb Michael Torrie: Please, no! We don't need emoji in this group. Fortunately the vast majority of posters use plain text (as is the etiquette) and so we don't have

Re: [OT] Re: has sourceforge exposed the dirty little secret ?

2018-01-07 Thread Richard Damon
On 1/7/18 7:07 PM, Gene Heskett wrote: On Sunday 07 January 2018 18:25:52 Random832 wrote: On Sun, Jan 7, 2018, at 17:47, Richard Damon wrote: But it also says: Content-Transfer-Encoding: 7bit Which is incorrect, as the message is actually 8bit encoded (since the Emoji aren't in the

Re: Distance between point and a line passing through other two points

2018-02-07 Thread Richard Damon
p1, p2 with a magnitude of |p1-p0| * |p2-p1| * sin(angle between line (p1,p0) and (p2,p1)) The distance you want is |p1-p0| * sin(angle between line (p1,p0) and (p2,p1)) With a bit of thought you should be able to get the answer. -- Richard Damon -- https://mail.python.org/mailman/listinfo/

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Richard Damon
is normal mail ISP likely even supports some form of Web Mail Client. If they are blocking these, but not Google Groups, there is a major disconnect in the rules. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Richard Damon
On 2/9/18 6:19 PM, codewiz...@gmail.com wrote: On Friday, February 9, 2018 at 5:03:45 PM UTC-5, Richard Damon wrote: On 2/9/18 4:12 PM, Chris Angelico wrote: On Sat, Feb 10, 2018 at 8:05 AM, wrote: On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote: codew...@gmail.com wrote

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

2018-02-18 Thread Richard Damon
like 1 + '2' and get 3, as string values will naturally convert themselves to numbers, Python won't do this. Yes Python will freely convert between numeric types, but I wouldn't say that Python claims to be a language that focuses on numerics. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

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

2018-02-18 Thread Richard Damon
loyee" I think you're agreeing with Steven. Static data types are not relevant for finding most of the bugs a program can have. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

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

2018-02-19 Thread Richard Damon
ning' and provides its own meaning to the statement. You really want to run with pedantic-errors enabled to get GCC to reject code with constraint violations. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

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

2018-02-20 Thread Richard Damon
> On Feb 20, 2018, at 8:58 AM, Chris Angelico wrote: > >> On Wed, Feb 21, 2018 at 12:53 AM, Antoon Pardon wrote: >> In C++ I can do something like: >> >> SomeClass MyVar; >> >> And after that the kind of possible assignments to MyVar are constraint. It >> makes the runtime throw an error wh

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

2018-02-21 Thread Richard Damon
ntly is 'now'. How big this 'timestop' needs to be depends on how wide the requirement is for temporal consistency. It might be just within a function, it might be for the full duration of the program run, 'now' might even be a parameter to the program, i.e. as of last

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-01 Thread Richard Damon
concept). You would also need to keep the current garbage collection, to handle the existing cases of circular references (I disagree with the original complaint that these are always 'errors', if you know you have garbage collection, the allowance of cycles knowing they will still g

Re: RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

2018-03-03 Thread Richard Damon
ificant overhead added (just a check for this method). Objects with these methods would still be subject to being cleaned up with garbage collection in the case they were kept alive via a cycle, having the cycle just makes it so that you don't get the immediate distruction. -- Rich

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-03 Thread Richard Damon
ant to be dealt with automatically, either being held for the whole program so OS cleanup handles it, or the are so fine grained that the explicitness isn't an issue. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-03 Thread Richard Damon
On 3/3/18 12:43 PM, Chris Angelico wrote: On Sun, Mar 4, 2018 at 4:37 AM, Richard Damon wrote: On 3/3/18 11:33 AM, Michael Torrie wrote: On 03/03/2018 09:02 AM, ooom...@gmail.com wrote: I can assure you that RAII does what it says on the tin and is relied on in many critical systems to

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-03 Thread Richard Damon
On 3/3/18 1:28 PM, Chris Angelico wrote: On Sun, Mar 4, 2018 at 5:22 AM, Richard Damon wrote: On 3/3/18 12:43 PM, Chris Angelico wrote: On Sun, Mar 4, 2018 at 4:37 AM, Richard Damon wrote: On 3/3/18 11:33 AM, Michael Torrie wrote: On 03/03/2018 09:02 AM, ooom...@gmail.com wrote: I can

Re: cute interview problem

2018-03-03 Thread Richard Damon
On 2/28/18 3:51 PM, Ian Kelly wrote: On Wed, Feb 28, 2018 at 12:55 PM, wrote: On Tuesday, 27 February 2018 00:42:02 UTC+1, Paul Rubin wrote: Ron Aaron posted the below url on comp.lang.forth. It points to what I thought was a cute problem, along with his solution in his Forth dialect 8th:

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-03 Thread Richard Damon
On 3/3/18 6:49 PM, Steven D'Aprano wrote: On Sat, 03 Mar 2018 12:37:08 -0500, Richard Damon wrote: With RAII and immediate destruction on end of scope, we can automate the release, without it and you need a lot of explicit code to manage these resources. Not so much.

Re: RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

2018-03-03 Thread Richard Damon
On 3/3/18 6:57 PM, Steven D'Aprano wrote: On Sat, 03 Mar 2018 10:01:43 -0700, Ian Kelly wrote: On Sat, Mar 3, 2018 at 9:19 AM, Richard Damon wrote: One idea does come to mind though, would it be reasonable, and somewhat Pythonic, for a class to define member functions like __ref_

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-03 Thread Richard Damon
On 3/3/18 9:10 PM, Chris Angelico wrote: On Sun, Mar 4, 2018 at 1:01 PM, Ooomzay wrote: On Saturday, 3 March 2018 17:44:08 UTC, Chris Angelico wrote: On Sun, Mar 4, 2018 at 4:37 AM, Richard Damon Yes, stack allocated object in C++ have a nice lifetime to allow RAII to work, but it doesn&#

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-04 Thread Richard Damon
eference cycle. This does limit what you can do with this sort of object, but that normally isn't a problem. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: Proposal: Deterministic Object Destruction

2018-03-04 Thread Richard Damon
e programmer, not the language) to use these RAII objects in ways that don't create cycles (or maybe that the program knows of the cycles and makes the effort to break them when it is important). So perhaps it can be said that cycle that involve major resource RAII objects should exist. -- Ric

Re: struggle to upgrade pip on visual studio code

2022-04-22 Thread Richard Damon
python found), you should be able to simpify that to python -m pip install --upgrade -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Automatic Gain Control in Python?

2022-05-28 Thread Richard Damon
t the material is surely under Copyright, so be careful what you do with it. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Automatic Gain Control in Python?

2022-05-29 Thread Richard Damon
thing to do with understanding how to grab podcasts. The system is working very well for that. Footnote: “What rhymes with orange?” “No, it doesn’t..” -Original Message- From: Richard Damon On Behalf Of Richard Damon Sent: Saturday, May 28, 2022 11:37 PM To: Steve GS Subject: Re: Autom

Re: Subtract n months from datetime

2022-06-21 Thread Richard Damon
. It says that often a month later than a given day isn't the same day of the month, but does make some operations less surprising. (This is hard to do to a date expressed as year-month-day, but trivial in some other formats like a timestamp.) -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand nested loops

2022-08-06 Thread Richard Damon
erate many warnings, either you have warnings enabled that you don't care about, or your code is doing things you have told the complier you shouldn't do. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand nested loops

2022-08-06 Thread Richard Damon
On 8/6/22 8:12 AM, Chris Angelico wrote: On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote: On 8/6/22 12:01 AM, Chris Angelico wrote: On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote: On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards wrote: In C, this doesn't do what it looks like

Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Richard Damon
to the current x.y object. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Nonuniform PRNG?

2022-12-07 Thread Richard Damon
apply, but the new test criteria would need to be computed based on computing the exected results and expected variation in that result, largely based on various cross correlations of the numbers. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Richard Damon
 > On Jan 3, 2023, at 10:38 AM, c.bu...@posteo.jp wrote: > Hello, > > this posting isn't about asking for a technical solution. My intention > is to understand the design decision Python's core developers made in > context of that topic. > > The logging module write everything to stderr no mat

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Richard Damon
> On Jan 4, 2023, at 8:56 AM, c.bu...@posteo.jp wrote: > > Hello, > > first I have to say that in my current and fresh humble opinion the > often seen "--verbose" switch in command line applications should > affect only the messages given to the users. This means messages on > "stdout". That is

Re: To clarify how Python handles two equal objects

2023-01-11 Thread Richard Damon
you phrase things does give me that nagging feeling that you still might be just a bit off. -- "Peace cannot be kept by force. It can only be achieved through understanding." -- Albert Einstein -- https://mail.python.org/mailman/listinfo/python-list -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-02-01 Thread Richard Damon
Bytes if the data is all Latin-1, as a sequence of 16-bit words if the data all fits on th BMP, and a sequence of 32 bit words if it has a value outside the BMP. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-02-01 Thread Richard Damon
ode Code Points, and you can define string literals of that type with U"string" notation. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Precision Tail-off?

2023-02-17 Thread Richard Damon
to the attention of the IEEE. I would like to know their response to it. That is why they have developed the Decimal Floating point format, to handle people with those sorts of problems. They just aren't common enough for many things to have adopted the use of it. Stephen Tucker. -

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Richard Damon
ld be to use the concept of an "abstract base" which allows the base to indicate that a derived class needs to define certain abstract methods, (If you need that sort of support, not defining a method might just mean the subclass doesn't support some optional behavior defi

Re: Weak Type Ability for Python

2023-04-13 Thread Richard Damon
type, and if so, converts its value to that type and does the operation. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-20 Thread Richard Damon
probably best to not actually allow. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Problems Installing and getting started.

2023-05-31 Thread Richard Damon
How are you trying to “Open” python? If you get that option screen, that sounds like you are trying to run the installer again. Knowing your Operating System would be very helpful. Python is normally run from the command line, or since you have the PyCharm IDE, it can run python on the program

Re: Python 2.7 and 3.9

2021-02-16 Thread Richard Damon
ds a lot on how everything was installed and how the path was setup. You will at least need the version 2 and version 3 pythons to be given different names, like python3 and then start the python 3 scripts with python3 my_script.py -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter long-running window freezes

2021-02-25 Thread Richard Damon
creating it each time.  Simplest is probably to link the Label to a StringVar instead of a fixed text and updating the variable to change the text. You can also (I believe) go into the Label and change the text it has with a configuration call. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: How to implement logging for an imported module?

2021-03-08 Thread Richard Damon
herit or has been specifically given a different value. General convention is that modules will use their name as the name of their logger, as that is generally unique. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Button placement

2021-03-09 Thread Richard Damon
e job. I was swearing when fighting with it with padding lol. > > -- > Thanks One thing to remember is that span is sort of like range, range(3) is [0, 1, 2] -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Why assert is not a function?

2021-03-12 Thread Richard Damon
r 'undefined behavior'. It is reasonable to skip the input assert if it becomes too expensive for benefit it provides, or if something else will catch the error. This likely actually applies to a lot of Python code, so it may seem that it doesn't apply. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Why assert is not a function?

2021-03-13 Thread Richard Damon
On 3/12/21 8:58 AM, Chris Angelico wrote: > On Sat, Mar 13, 2021 at 12:11 AM Richard Damon > wrote: >> On 3/12/21 12:31 AM, Chris Angelico wrote: >>> On Fri, Mar 12, 2021 at 3:53 PM Cameron Simpson wrote: >>>> For me, try/except is for when something might rea

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
built in title() function is basically an intentionally 80% solution. It handles the simple cases simply, and if you might have the more complicated cases, you have to handle that yourself because to specify what the 'right' answer would be is basically impossible to do in general (becaus

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
amin One important thing to remember is that there ARE a few characters that are themselves 'Title case', so we can't live with just upper and lower. These all are 'digraphs', i.e. look like two letters, but this glyph does act as a single character for many purposes. One

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
Help on method_descriptor: > > title(self, /) >     Return a version of the string where each word is titlecased. > >     More specifically, words start with uppercased characters and all > remaining >     cased characters have lower case. > > '\N{LATIN CAPITAL LETTER DZ}', '\N{LATIN SMALL LETTER DZ}' and > '\N{LATIN CAPITAL LETTER D WITH SMALL LETTER Z}' are all digraphs, so > is it correct to say that .title() uppercases the first character? > Kind of. I think the clarification calling them upper cased characters is close enough considering that there are only 31 title cased characters, all digraphs. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 10:28 PM, Chris Angelico wrote: > On Mon, Mar 22, 2021 at 12:26 PM Richard Damon > wrote: >> On 3/21/21 7:31 PM, MRAB wrote: >>> On 2021-03-21 22:30, Chris Angelico wrote: >>>> On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards >>>> wrot

Re: .title() - annoying mistake

2021-03-22 Thread Richard Damon
I am not positive that its description exactly matches what .title() produces, but it close, and the way it is written, "Python's".istitle() is False, as the s at the end needs to be uppper case to satisfy as ' is uncased, so the next cased character must be upper case. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: A 35mm film camera represented in Python object

2021-04-01 Thread Richard Damon
logic to them - the movement of A determines that of B which > determines that of C which determines that of D which finally also > affects the movement of A. > > Any thoughts or wise ideas? > > Daniele If you keep track of the positions as a floating point number, the precision will be more than you could actually measure it. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: A 35mm film camera represented in Python object

2021-04-01 Thread Richard Damon
On 4/1/21 6:41 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: > On 2021-04-01 at 18:10:46 -0400, > Richard Damon wrote: > >> On 4/1/21 5:47 PM, D.M. Procida wrote: >>> D.M. Procida wrote: >>> >>>> Hi everyone, I've created <https://github.com/

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Richard Damon
ssions to the group, emailed to it, and people would need to log into the email account on that computer to approve all the posts, or a robot could perhaps be setup to auto-approve most based on some rules. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Richard Damon
On 5/5/21 10:44 PM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/5/21 9:40 PM, Jon Ribbens via Python-list wrote: >>> On 2021-05-06, Paul Bryan wrote: >>>> What's involved in moderating c.l.p? Would there be volunteers willin

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
On 5/6/21 6:12 AM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/5/21 10:44 PM, Jon Ribbens via Python-list wrote: >>> On 2021-05-06, Richard Damon wrote: >>>> As someone with a long usenet background, converting the existing gr

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
Usenet being a distributed system, doesn't support this model. Either anybody can inject a message from wherever they are, no all messages are sent to be reviewed, the unmoderated and moderated is a VERY sharp line. In Usenet terms, lists like this would be described as loosely robo-moderated. And

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Richard Damon
On 5/6/21 9:44 AM, Jon Ribbens via Python-list wrote: > On 2021-05-06, Richard Damon wrote: >> On 5/6/21 6:12 AM, Jon Ribbens via Python-list wrote: >>> I think you're fundamentally missing the point that the newsgroup is >>> *already gatewayed to the mailing li

Re: for the installation of pycharm

2021-05-08 Thread Richard Damon
On 5/8/21 10:49 AM, mishrasamir2...@gmail.com wrote: >Sir/madam, > >Please provide me the latest version of pycharm quickly. > >Samir Mishra You just need to go to the jetbrains web site and it is available there. They even have a free version there. -- Richard D

Unexpected Inheritance Problem

2021-05-19 Thread Richard Damon
ms be requiring the parameters for the __init__ call of the base class too, even though there is a call to it through the super().__init__() Is this expected? Can derived classes not provide values for parameters to construct the base classes? Is there something funny because I am making the call from a member of that base class? -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Unexpected Inheritance Problem

2021-05-20 Thread Richard Damon
On 5/20/21 3:24 AM, Peter Otten wrote: > On 20/05/2021 06:00, Richard Damon wrote: > >> class GedcomHead(Gedcom0Tag): >> """GEDCOM 0 HEAD tag""" >> def ___init___(self, *, parent): > > An __init__ with three underscores; you m

Re: Unexpected Inheritance Problem

2021-05-20 Thread Richard Damon
On 5/20/21 1:58 AM, Chris Angelico wrote: > On Thu, May 20, 2021 at 2:02 PM Richard Damon > wrote: >> Given the following definition of classes, I am getting an unexpected >> error of : >> >> TypeError: __init__() missing 2 required keyword-only arguments: >

Re: learning python ...

2021-05-25 Thread Richard Damon
ou mutate the object the parameter was bound to, the calling function will see the changed object. (This requires the object to BE mutateable, like a list, not an int) If you rebind that parameter to a new object, the calling function doesn't see the change, as its name wasn't rebound.

Re: optimization of rule-based model on discrete variables

2021-06-14 Thread Richard Damon
ng sure that the rule set covers every value in the data array, and never gives one input value two different y values. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: what to do with multiple BOMs

2021-08-19 Thread Richard Damon
By the rules of Unicode, that character, if not the very first character of the file, should be treated as a “zero-width non-breaking space”, it is NOT a BOM character there. It’s presence in the files is almost certainly an error, and being caused by broken software or software processing file

Re: configargparse - reading option from config only

2021-08-26 Thread Richard Damon
> > Is there an elegant way to do this? > > Cheers, > > Loris > Look at the read() member function to supply the file name to read. Then in the config object there will be sections for each section in the config file. No need for any of these to be 'options' -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: configargparse - reading option from config only

2021-08-27 Thread Richard Damon
On 8/27/21 3:37 AM, Loris Bennett wrote: > Richard Damon writes: > >> On 8/26/21 6:01 AM, Loris Bennett wrote: >>> Hi, >>> >>> When using configargparse, it seems that if a value is to be read from a >>> config file, it also has to be defined as a

Re: on floating-point numbers

2021-09-04 Thread Richard Damon
On 9/4/21 9:40 AM, Hope Rouselle wrote: > Chris Angelico writes: > >> On Fri, Sep 3, 2021 at 4:58 AM Hope Rouselle wrote: >>> >>> Hope Rouselle writes: >>> Just sharing a case of floating-point numbers. Nothing needed to be solved or to be figured out. Just bringing up conversation.

Re: on floating-point numbers

2021-09-05 Thread Richard Damon
> On Sep 5, 2021, at 6:22 PM, Peter J. Holzer wrote: > > On 2021-09-04 10:01:23 -0400, Richard Damon wrote: >>> On 9/4/21 9:40 AM, Hope Rouselle wrote: >>> Hm, I think I see what you're saying. You're saying multiplication and >>> division in

Re: on writing a while loop for rolling two dice

2021-09-07 Thread Richard Damon
ssy to exactly the order you do things, the cases where the difference is intended is likely fairly small. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Richard Damon
hat don't need an installer. Likely, just copying an EXE file from an outside source may still be against the rules (and needs approval), but some think if they can do it and no one complains, it must be ok. On the other hand, they may have given approval, knowing the source. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: frozenset can be altered by |=

2021-11-29 Thread Richard Damon
place operators that if a type doesn't support the inplace operator, it is automatically converted into the equivalent assignment with the binary operator? -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: C is it always faster than nump?

2022-02-25 Thread Richard Damon
erson without that level of care and effort. There are similar package available for many languages, including C/C++ to let mere mortals get efficient numerical processing. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: C is it always faster than nump?

2022-02-25 Thread Richard Damon
On 2/25/22 2:47 PM, Chris Angelico wrote: On Sat, 26 Feb 2022 at 05:49, Richard Damon wrote: On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote: Hi, a lot of people think that C (or C++) is faster than python, yes I agree, but I think that's not the case with numpy, I believe numpy is faster

Re: No shortcut Icon on Desktop

2022-04-14 Thread Richard Damon
r isn't the sort of program that makes sense to make a desktop icon for, as it is a command line utility. Perhaps making an icon for IDLE, if it has also been installed, but then the issue becomes would people recognize 'IDLE' as 'Python' to click on. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Entering a very large number

2018-03-23 Thread Richard Damon
string is probably the better way to define it, and take the cost of the conversion as part of the cost to be pretty. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Putting Unicode characters in JSON

2018-03-23 Thread Richard Damon
at at least for today, Unicode is the best solution for storing arbitrary text, and forcing that change down to the fundamental level. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Entering a very large number

2018-03-25 Thread Richard Damon
On 3/25/18 8:32 AM, bartc wrote: On 25/03/2018 02:47, Steven D'Aprano wrote: On Sun, 25 Mar 2018 00:05:56 +0100, Peter J. Holzer wrote: [...] yes, good idea Not if you want to avoid that string to int conversion (as you stated). That is still there, but in addition you now split the string

Re: Entering a very large number

2018-03-25 Thread Richard Damon
On 3/25/18 9:37 PM, bartc wrote: On 26/03/2018 00:27, Richard Damon wrote: On 3/25/18 8:32 AM, bartc wrote: Using CPython on my machine, doing a string to int conversion that specific number took 200 times as long as doing a normal assignment. That conversion took 4 microseconds. Not

Re: Entering a very large number

2018-03-26 Thread Richard Damon
On 3/26/18 6:45 AM, bartc wrote: On 26/03/2018 03:35, Richard Damon wrote: On 3/25/18 9:37 PM, bartc wrote: So the overhead /can/ be substantial, and /can/ be significant compared with doing bignum calculations. Of course, once initialised, C might be used a hundred times, then the

Re: Entering a very large number

2018-03-26 Thread Richard Damon
the execution time saves you 0.995%, not normally worth it unless your program is currently running at 100.004% of the allowed (or acceptable) timing, if acceptable timing can even be defined that precisely. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: Entering a very large number

2018-03-26 Thread Richard Damon
On 3/26/18 8:46 AM, bartc wrote: On 26/03/2018 13:30, Richard Damon wrote: On 3/26/18 6:31 AM, bartc wrote: The purpose was to establish how such int("...") conversions compare in overheads with actual arithmetic with the resulting numbers. Of course if this was done in C with

Re: Entering a very large number

2018-03-30 Thread Richard Damon
On 3/30/18 6:41 AM, bartc wrote: On 27/03/2018 04:49, Richard Damon wrote: On 3/26/18 8:46 AM, bartc wrote: Hence my testing with CPython 3.6, rather than on something like PyPy which can give results that are meaningless. Because, for example, real code doesn't repeatedly execute the

Re: Asynchronous processing is more efficient -- surely not?

2018-04-04 Thread Richard Damon
sing can better use up, so even processor usage can be improved in many cases. In most cases I am familiar with, the type of asynchronous programming you are talking about is to move I/O bound operations into a second execution path, allowing your main path to focus on keeping the CPU busy. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

Re: object types, mutable or not?

2018-05-13 Thread Richard Damon
inting to (the string 'a1b2') and then obj was set to point to that new object, and the old string object became unreferenced and will at some point be cleaned up (if between the two assignment you did a obj2 = obj, then obj2 would continue to point to that original string object).

Re: syntax oddities

2018-05-18 Thread Richard Damon
needed'. Here Interspersed/Bottom posting works better (Interspersed if responding point by point, Bottom if single point or responding to the message en-total.) Mailing list, Usenet, Forums and the like all tend to fall into the second category, but people more used to the more private typ

Re: syntax oddities

2018-05-18 Thread Richard Damon
On 5/18/18 10:38 AM, Chris Angelico wrote: > On Sat, May 19, 2018 at 12:30 AM, Richard Damon > wrote: >> I would divide the two communities/cultures differently. Top Posting is >> reasonable, effective and common in an environment where the primary >> recipients of the m

  1   2   3   4   >