Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-09 Thread Antoon Pardon
ree to assume that not one of his friends will be from any > culture other than his own. It just happens to be a bigoted viewpoint. He didn't make that assumption. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-09 Thread Antoon Pardon
rd names as he sees fit. He doesn't own anyone an explanation of how he organises his own personal address book. Just because you can only think of one conclusion to draw from his words, doesn't mean that is the only possible conclusion. -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-09 Thread Antoon Pardon
Op 09-03-17 om 13:16 schreef Chris Angelico: > On Thu, Mar 9, 2017 at 11:06 PM, Antoon Pardon > wrote: >> Op 09-03-17 om 12:32 schreef Chris Angelico: >> >>> On Thu, Mar 9, 2017 at 8:25 AM, Chris Green wrote: >>>> Yes, I'm well aware of these issues,

Re: C-Python and Endianness

2017-03-27 Thread Antoon Pardon
Op 26-03-17 om 08:47 schreef Ganesh Pal: > Hello Team , > > > > > I want to write the hexadecimal string that is passed from python as it > is on disk in C , my problem is that the values are getting stored in > little endian and Are you sure you are passing a string? Or are you passing a

Re: Looping [was Re: Python and the need for speed]

2017-04-19 Thread Antoon Pardon
Op 16-04-17 om 19:07 schreef Terry Reedy: > On 4/16/2017 11:35 AM, Michael Torrie wrote: >> On 04/16/2017 07:57 AM, bartc wrote: >>> But people just don't want it. >>> >>> /That/ is what surprises me, when people reject things that to me are >>> no-brainers. > > Whereas to me, it is a no-brainer th

Re: Bigotry (you win, I give up)

2017-04-21 Thread Antoon Pardon
Op 20-04-17 om 17:25 schreef Rustom Mody: > But more importantly thank you for your polite and consistent pointing out to > Ben Finney that his religion-bashing signature lines [many of them] and his > claims to wish this list be welcoming are way out of sync. I don't know. I think a concept like

Re: Bigotry (you win, I give up)

2017-04-24 Thread Antoon Pardon
Op 22-04-17 om 13:17 schreef Rustom Mody: > On Friday, April 21, 2017 at 2:38:08 PM UTC+5:30, Antoon Pardon wrote: >> Op 20-04-17 om 17:25 schreef Rustom Mody: >>> But more importantly thank you for your polite and consistent pointing out >>> to >>> Ben Finney

Not cathing nested StopIteration

2017-07-21 Thread Antoon Pardon
This is python 3.4 on a debian box In the code below, line 36 raises a StopIteration, I would have thought that this exception would be caught by line 39 but instead I get a traceback. Did I miss something or is this a bug? This is the code: try:

Re: Not cathing nested StopIteration

2017-07-21 Thread Antoon Pardon
Thanks Peter and Chris for helping to resolve the knot in my brain. -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposed new syntax

2017-08-24 Thread Antoon Pardon
e question is not applicable in this kind of studies. A proposition is provable in a particular system or not, but it is important to specify what system you are talking about. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string equality

2017-08-31 Thread Antoon Pardon
IMO this should be solved by a company used library and I would go in the direction of a Normalized_String class. This has the advantages (1) that the company can choose whatever normalization suits them, not all cases are suited by comparing case insentitively, (2) individual devs in the com

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

2017-11-27 Thread nospam . Antoon Pardon
ll be just too hard. > (or one must define a new whole language specially for some local script) Well maybe the value is not huge, but I really appreciate the possibility. Being able to write something like below, makes things a lot more clear for me. Po = Pc + R * Vec(cos(î,o), sin(î,o)) Pe = Pc + R * Vec(cos(î,e), sin(î,e)) gØÜ«î, = î,e - î,o gØÜ«P = Pe - Po -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

return type same as class gives NameError.

2023-10-22 Thread Antoon Pardon via Python-list
I have the following small module: =-=-=-=-=-=-=-=-=-=-=-= 8< =-=-=-=-=-=-=-=-=-=-=-=-= from typing import NamedTuple, TypeAlias, Union from collections.abc import Sequence PNT: TypeAlias = tuple[float, float] class Pnt (NamedTuple): x: float y: float def __add__(self, other: PNT)

making your own DirEntry.

2023-12-22 Thread Antoon Pardon via Python-list
ks parameter in the is_dir, is_file, ... methods. -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

Re: making your own DirEntry.

2023-12-23 Thread Antoon Pardon via Python-list
Op 22/12/2023 om 21:39 schreef DL Neil via Python-list: Antoon, On 12/23/23 01:00, Antoon Pardon via Python-list wrote: I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could

Re: making your own DirEntry.

2023-12-23 Thread Antoon Pardon via Python-list
Op 23/12/2023 om 12:34 schreef Barry Scott: On 23 Dec 2023, at 09:48, Antoon Pardon via Python-list wrote: Because I have functions with DirEntry parameters. I would duck-type a class I control to be my DirEnrry in this situation. Would also help you when debugging as you can tell

Re: mypy question

2024-01-12 Thread Antoon Pardon via Python-list
type hint for queries shouldn't be the following. queries:list[dict[str,str]|dict[str,list]|dict[str,dict[str, dict[str, Ant]]] My impression at this moment is that you are write something like: dict[str, str | int] as as shorthand for dict[str, str] | dict[str, int]. But those two are different types. -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-15 Thread Antoon Pardon via Python-list
it helpful to have a modified/extended BNF description of a superset of the intended language and used other means to further check whether the code in question was valid or not. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list

Re: A missing iterator on itertools module?

2024-04-03 Thread Antoon Pardon via Python-list
Op 28/03/2024 om 17:45 schreef ast via Python-list: Hello Suppose I have these 3 strings: s1 = "AZERTY" s2 = "QSDFGH" s3 = "WXCVBN" and I need an itertor who delivers A Q W Z S C E D C ... I didn't found anything in itertools to do the job. The documentation mentions a roundrobin recipe

Re: Beazley's Problem

2024-10-06 Thread Antoon Pardon via Python-list
ng is stateless where you are not allowed to store any state (current best guess root). That doesn't prevent you from passing state along as a parameter, usualy in some helper function. -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

<    14   15   16   17   18   19