Re: Python 3.x and bytes

2011-05-17 Thread Ethan Furman
Corey Richardson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/17/2011 02:47 PM, Ethan Furman wrote: In Python 3 one can say --> huh = bytes(5) Since the bytes type is actually a list of integers, I would have expected this to have huh being a bytestring with one element --

Re: Python 3.x and bytes

2011-05-17 Thread Ethan Furman
Ian Kelly wrote: On Tue, May 17, 2011 at 2:20 PM, Ethan Furman wrote: The big question, though, is would you do it this way: some_var = bytes(23).replace(b'\x00', b'a') or this way? some_var = bytes(b'a' * 23) Actually, I would just do it this way: some_var

Re: Python 3.x and bytes

2011-05-18 Thread Ethan Furman
Ian Kelly wrote: On Tue, May 17, 2011 at 2:20 PM, Ethan Furman wrote: The big question, though, is would you do it this way: some_var = bytes(23).replace(b'\x00', b'a') or this way? some_var = bytes(b'a' * 23) Actually, I would just do it this way: some_var

Re: Trying to understand html.parser.HTMLParser

2011-05-19 Thread Ethan Furman
Andrew Berg wrote: ElementTree doesn't seem to have been updated in a long time, so I'll assume it won't work with Python 3. I don't know how to use it, but you'll find ElementTree as xml.etree in Python 3. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

hash values and equality

2011-05-19 Thread Ethan Furman
d[three] = '3' --> d {: '1', : '3', : '2'} --> d[1] = '1.0' --> d[2] = '2.0' --> d[3] = '3.0' --> d {: '3', 1: '1.0', 2: '2.0', 3: '3.0', : '2', : '1'} --> d[2] '2.0' --> d[two] '2' All information greatly appreciated! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: hash values and equality

2011-05-20 Thread Ethan Furman
Chris Rebert wrote: On Thu, May 19, 2011 at 10:43 PM, Ethan Furman wrote: Several folk have said that objects that compare equal must hash equal, and the docs also state this http://docs.python.org/dev/reference/datamodel.html#object.__hash__ I'm hoping somebody can tell me what hor

Re: hash values and equality

2011-05-20 Thread Ethan Furman
Peter Otten wrote: Ethan Furman wrote: Several folk have said that objects that compare equal must hash equal, and the docs also state this http://docs.python.org/dev/reference/datamodel.html#object.__hash__ I'm hoping somebody can tell me what horrible thing will happen if this isn&

Re: hash values and equality

2011-05-20 Thread Ethan Furman
Ulrich Eckhardt wrote: Ethan Furman wrote: Several folk have said that objects that compare equal must hash equal, and the docs also state this http://docs.python.org/dev/reference/datamodel.html#object.__hash__ I'm hoping somebody can tell me what horrible thing will happen if this isn&

Re: hash values and equality

2011-05-20 Thread Ethan Furman
Ethan Furman wrote: Several folk have said that objects that compare equal must hash equal, and the docs also state this http://docs.python.org/dev/reference/datamodel.html#object.__hash__ Two things I didn't make clear originally: I'm using Python3. My objects (of type Wierd

Re: hash values and equality

2011-05-20 Thread Ethan Furman
Peter Otten wrote: Ethan Furman wrote: Peter Otten wrote: Ethan Furman wrote: Several folk have said that objects that compare equal must hash equal, and the docs also state this http://docs.python.org/dev/reference/datamodel.html#object.__hash__ --> class Wierd(): ... def __ini

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Ethan Furman
fits Perl (or vice versa) better than most. So enjoy it. Ignore anyone who says otherwise. +1 If everybody's brain worked the same, we wouldn't have so many different languages to choose from. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ethan Furman
;t support the buffer API You are trying to split a bytes object with a str object -- the two are not compatible. Try splitting with the bytes object b'\t'. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ethan Furman
objects' rather than 'bytestrings' as they are really lists of integers. Accessing a single element of a bytes object does not return a bytes object, but rather the integer at that location; i.e. --> b'xyz'[1] 121 Contrast that with the str type where --> 'xyz'[1] 'y' ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Ethan Furman
ative posts -- please don't resort to this tactic. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

bug in str.startswith() and str.endswith()

2011-05-26 Thread Ethan Furman
stop comparing string at that position str.endswith(suffix[, start[, end]]) Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop compar

Re: Why did Quora choose Python for its development?

2011-05-27 Thread Ethan Furman
sorry - dumb[1] question? He asked the question not once, but multiple times (IIRC at least three, possible more) -- after a while it stops being rhetorical. I would say also, if you don't want an answer, don't ask the question. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in str.startswith() and str.endswith()

2011-05-27 Thread Ethan Furman
Ethan Furman wrote: Any reason this is not a bug? Looks like someone else beat me to filing: http://bugs.python.org/issue11828 Looks like they fixed it as well. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-27 Thread Ethan Furman
**kwargs) TypeError: bar() got multiple values for keyword argument 'y' And the above error is exactly why you don't want to use named arguments in MI -- because you don't know in what order the methods will be called, you cannot know which named arguments to supply to the me

Re: The worth of comments

2011-05-27 Thread Ethan Furman
Miki Tebeka wrote: https://docs.google.com/present/view?id=ah82mvnssv5d_162dbgx78gw ;) +1 That was hilarious. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzled by list-appending behavior

2011-05-27 Thread Ethan Furman
raise ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-27 Thread Ethan Furman
need to stay with 2.7. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-27 Thread Ethan Furman
that, at least, would be one less bug waiting to happen. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-27 Thread Ethan Furman
on the other "code that can cross-execute on either version"? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Ethan Furman
Henry Olders wrote: [...] what I want is a function that is free of side effects [...] Shoot, that's easy! Just write your function to not have any! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Ethan Furman
Henry Olders wrote: Clearly, making a copy within the function eliminates the possibility of the side effects caused by passing in mutable objects. Would having the compiler/interpreter do this automatically make python so much different? It would be a different language. ~Ethan~ -- http

Re: returning NotImplemented

2011-05-31 Thread Ethan Furman
raise TypeError (or any exception), the second object would not get the chance to try. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: returning NotImplemented

2011-05-31 Thread Ethan Furman
bject was buggy -- for __eq__ we'd end up with a False result, instead of getting the exception propagated. (!) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: float("nan") in set or as key

2011-06-01 Thread Ethan Furman
utes now. Is it just incredibly slow? Any enlightenment appreciated! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Delay a computation in another thread

2017-09-08 Thread Ethan Furman
sm such as an Event. -- ~Ethan~ * https://docs.python.org/3/library/threading.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread Ethan Furman
tors* also motivated by the numerical/scientific community? -- ~Ethan~ * __le__, __gt__, etc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-19 Thread Ethan Furman
- (give a dollar back) $5.00 - (give a five back) and $10.00! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Stdlib, what's in, what's out

2017-09-20 Thread Ethan Furman
as large as wxPython would not magically make it so the same target dates were hit -- it's not like we have core-devs sitting idly by waiting for something to do. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-05 Thread Ethan Furman
t teaching is hard, but please don't make learning harder than it already is. One does not need to understand fluid dynamics nor specific gravity in order to swim. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Posts by Stefan Ram

2017-11-21 Thread Ethan Furman
your messages will be auto-discarded at the Usenet/mailing list boundary. Everyone else, please do not quote Stefan's messages as they may then end up on the mailing list possibly violating his copyright. -- ~Ethan~ [1] https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: we want python software

2017-12-05 Thread Ethan Furman
On 12/05/2017 09:27 PM, km wrote: [snip] Many things in this world are frustrating, but being hateful will not solve anything. Please control yourself. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: we want python software

2017-12-06 Thread Ethan Furman
05/2017 09:27 PM, km wrote: > You people can Google and watch movies / songs online and you can't find > how to download and install python ? That's ridiculous! Really, Steve? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
pam') 'spam' --> identity('spam', 'eggs', 7) ('spam', 'eggs', 7) Of the five answers to that SO question, mine is the only one that will correctly handle those three examples. If you agree with my contention feel free to up-vote my answer.

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
On 12/07/2017 10:53 AM, Peter Otten wrote: Ethan Furman wrote: The simple answer is No, and all the answers agree on that point. It does beg the question of what an identity function is, though. My contention is that an identity function is a do-nothing function that simply returns what it

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
On 12/07/2017 11:23 AM, Ned Batchelder wrote: On 12/7/17 1:28 PM, Ethan Furman wrote: --> identity('spam', 'eggs', 7) ('spam', 'eggs', 7) I don't see why this last case should hold. Why does the function take more than one argument? An

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
On 12/07/2017 11:46 AM, Paul Moore wrote: On 7 December 2017 at 18:28, Ethan Furman wrote: The simple answer is No, and all the answers agree on that point. It does beg the question of what an identity function is, though. My contention is that an identity function is a do-nothing function

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
hrows away the information about the number of arguments it was called with. I would expect an identity() function to be lossless ("bijective") and I think that is possible only if you restrict it to a single argument. Thanks for exposing/clarifying that flaw. I have removed my ans

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Ethan Furman
On 12/07/2017 10:28 AM, Ethan Furman wrote: The simple answer is No, and all the answers agree on that point. It does beg the question of what an identity function is, though. Thankfully, Paul answered that question with a good explanation*. Thanks, everyone, for the discussion. -- ~Ethan

Re: we want python software

2017-12-08 Thread Ethan Furman
On 12/05/2017 09:27 PM, km wrote: [snip] Many things in this world are frustrating, but being hateful will not solve anything. Please control yourself. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does __ne__ exist?

2018-01-07 Thread Ethan Furman
as added at the behest of the scientific/numerical community. -- ~Ethan~ * Yeah, I can't remember the cool name for those six operators at the moment. :( -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does __ne__ exist?

2018-01-07 Thread Ethan Furman
On 01/07/2018 04:31 PM, breamore...@gmail.com wrote: On Monday, January 8, 2018 at 12:02:09 AM UTC, Ethan Furman wrote: On 01/07/2018 12:33 PM, Chris Angelico wrote: On Mon, Jan 8, 2018 at 7:13 AM, Thomas Jollans wrote: On 07/01/18 20:55, Chris Angelico wrote: Under what circumstances

Re: Why does __ne__ exist?

2018-01-07 Thread Ethan Furman
not existed for years, its addition could be justified? Considering we just recently added a matrix-multiplication operator, yes. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Ethan Furman
em off and leave the internet forever.) What's a... modem? Its the component of the router that actually handles the telecommunications side of things. Legend has it that once upon a time they were a stand alone device. Mine was never stand-alone. I always had to prop it up with some bo

Re: Enums and nested classes

2022-04-21 Thread Ethan Furman
ctice, not for what should happen in theory. ;-) And of course, no one using enums that way means we can change how that bit works fairly easily. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Style for docstring

2022-04-22 Thread Ethan Furman
On 4/22/22 12:36, Michael F. Stemper wrote:   Tells caller whether or not a permutation is even.   Determines if a permutation is even. (Alternative is that it's odd.)   Returns True if permutation is even, False if it is odd. Third option. -- ~Ethan~ -- https://mail.python.org/ma

Async SIG post

2022-04-28 Thread Ethan Furman
/archives/list/async-...@python.org/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: mailbox misbehavior with non-ASCII

2022-07-29 Thread Ethan Furman
ould be the right answer. > > Is this worth a bug report? I would say yes. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Friendly Reminder

2022-12-20 Thread Ethan Furman
Happy Pythoning, and happy holidays! -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Possible re bug when using ".*"

2022-12-28 Thread Ethan Furman
ng. It's not a bug, it's a change in behaviour to bring it more into line with other regex implementations in other languages. The new behavior makes no sense to me, but better to be consistent with the other regex engines than not -- I still get thrown off by vim's regex. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: To clarify how Python handles two equal objects

2023-01-10 Thread Ethan Furman
o mutate `arr1` instead of reassigning it: arr1[:] = [10, 11, 12] -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: The Zen of D.E.K.

2023-01-13 Thread Ethan Furman
uth [okay, falling for the troll bait] Those two things do not say the same thing; further, in Python at least, and depending on the situation, aesthetics may /not/ be more important than efficiency. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-29 Thread Ethan Furman
This thread has run its course and seems to now be generating more heat than light. It is now closed (at least on the Python List side). Thank you everyone for your participation and understanding. -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Not receiving posts

2023-02-23 Thread Ethan Furman
eceived no emails from the list. To my knowledge I have done nothing to warrant > removal. > > Can you please check and see what I need to do to start receiving emails once more. It doesn't look like that address is subscribed. I tried inviting you, let's see if that works. -

Hen Hanna & google groups

2023-02-27 Thread Ethan Furman
Greetings, all! As has been stated, Hen Hanna is posting through Google Groups, over which the Python List moderators have zero control. The only thing we can do, and which has now been done, is not allow those posts in to the Python List. -- ~Ethan~ Moderator -- https://mail.python.org

Re: Python 3.10 Fizzbuzz

2023-02-27 Thread Ethan Furman
important matters." > > Somehow I don't think we would get along very well. I'm a little on the > opinionated side myself. I personally cannot stand Black. It feels like every major choice it makes (and some minor ones) are exactly the opposite of the choice I make. -- ~Ethan~ --

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-03 Thread Ethan Furman
same. When writing classes and subclasses, I use `obj.__class__`, `isinstance` otherwise, and rarely `type(obj)` (and then mostly with `tuple`s, as they're special). ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: why sqrt is not a built-in function?

2021-01-14 Thread Ethan Furman
you. Any time. ;-) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: why sqrt is not a built-in function?

2021-01-14 Thread Ethan Furman
math.sqrt(x) Plus the ** operation ("root = x ** 0.5"), that's now three ways. Yes, but which of those is obvious? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: help

2021-01-26 Thread Ethan Furman
? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Mr. Flibble

2021-02-15 Thread Ethan Furman
Thank you to those who pointed out this individual to the moderators. As Mr. Flibble accurately noted, he is not on the mailing list -- so his posts won't be here either. -- ~Ethan~ Python List Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Mr. Flibble

2021-02-15 Thread Ethan Furman
On 2/15/21 2:02 PM, Grant Edwards wrote: On 2021-02-15, Ben Bacarisse wrote: You said you used Usenet (and your reply here was via Usenet). Usenet posts to comp.lang.python don't go to the mailing list (the "here" that Ethan is talking about). Mails to the list /are/ sent her

Re: Python 2.7 and 3.9

2021-02-16 Thread Ethan Furman
are those scripts being run? Microsoft Windows or Unix/Linux/BSD? Typically, the first line of a script will say which version of Python is needed. For example, on a *nix type system: #!/usr/bin/python2 -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 and 3.9

2021-02-16 Thread Ethan Furman
I too was expecting users to type: python my_Script.py! I'm afraid I have no experience with the above, hopefully somebody else on the list does. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
dy to describe that concept? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 8:28 AM, 2qdxy4rzwzuui...@potatochowder.com wrote: Entangled? Hey, I like that one! ;-) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 12:40 PM, Alan Gauld via Python-list wrote: On 24/02/2021 16:12, Ethan Furman wrote: I'm looking for a name for a group of options that, when one is specified, all of them must be specified. For contrast, - radio buttons: a group of options where only one can be spec

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
7;d be two separate mandatory text fields, both controlled (i.e., enabled or disabled) by one checkbox.) I didn't say it was a good example. ;-) Hopefully it gets the idea across. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 1:54 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: Ethan Furman wrote: I didn't say it was a good example. ;-) Hopefully it gets the idea across. Ditto. ;-) IMO, the whole idea of "my program has two options, and the user has to specify both or neither," isn&

Re: name for a mutually inclusive relationship

2021-02-25 Thread Ethan Furman
On 2/25/21 7:06 PM, Joe Pfeiffer wrote: Ethan Furman writes: Like I said, at this moment I don't have a good example, only an awareness that such a thing could exist and I don't know the name for it (if it has one). So far I have seen that there are even fewer good use-cases th

editor recommendations?

2021-02-26 Thread Ethan Furman
black background is only for the text-editing portion which leaves large portions of screen real-estate with a bright background, which is hard on my eyes. So, what's the state-of-the-art with regards to editors supporting dark color themes? TIA. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Why assert is not a function?

2021-03-11 Thread Ethan Furman
during testing and QA, turn off double-checks for production for best performance possible. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-03-31 Thread Ethan Furman
lass__` is there to provide metaclass power without needing a full-blown metaclass. I vote elegant hack. :) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: How does "__doc__ % globals()" work?

2021-04-12 Thread Ethan Furman
o, Jaime # keyed `hello, %(a_name)s` % {'a_name': 'Ethan'} # hello, Ethan What you are seeing is the keyed version. So, if the module had, for example: version = 1.3 author = 'GvR' date = '2021-04-12' and the doc string was __

Re: do ya still use python?

2021-04-19 Thread Ethan Furman
On 4/19/21 11:22 AM, Unbreakable Disease wrote: [offensive drivel] List, my apologies -- not sure how that one got through. -- ~Ethan~ Python List Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Unsubscribe/can't login

2021-05-05 Thread Ethan Furman
appen with all my messages? I'm reading the mailing list via > news.gmaneio. I see your messages twice (occasionally with other posters as well). I have no idea how to fix it. :( -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Annoying message duplication, was Re: Unsubscribe/can't login

2021-05-05 Thread Ethan Furman
On 5/5/21 7:39 AM, Peter Otten wrote: > On 05/05/2021 16:10, Ethan Furman wrote: >> I see your messages twice (occasionally with other posters as well). I have no idea how to fix it. :( > > OK, I'll try another option from Thunderbird's context menu: Followup to

Re: Transistion from module to package and __init__.py

2021-05-05 Thread Ethan Furman
converting to multiple files simply because there is so much (10k lines for me, YMMV). -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

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

2021-05-06 Thread Ethan Furman
tion that > Mailman 3 cannot be used while a gateway is involved is untrue: > https://mailman.readthedocs.io/en/latest/src/mailman/handlers/docs/nntp.html Interesting. I know the NNTP gateway wasn't there a couple years ago, and I do not see a date as to when that became possible.

Typing and Enum and Abstract

2021-05-20 Thread Ethan Furman
Here's a question on SO about typing, enum, and ABC: https://stackoverflow.com/q/67610562/208880 No answers so far. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

name for new Enum decorator

2021-05-27 Thread Ethan Furman
hen the programmer thinks it's appropriate... but I have no idea what to call it. Any nominations? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Definition of "property"

2021-05-30 Thread Ethan Furman
of just returning the eggs object > (as it would for any other attribute) it will call the __get__ method (since we were doing lookup) > and return whatever that method returns. Feel free to use that however you like. :) -- ~Ethan~ [1] https://stackoverflow.com/a/7377013/208880 -- https://mail.python.org/mailman/listinfo/python-list

Re: Neither pdb or print() displays the bug

2021-06-01 Thread Ethan Furman
th a file if you wanted to. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Neither pdb or print() displays the bug

2021-06-01 Thread Ethan Furman
then in my code: logger.info('failure converting %r to %r', target_bmp_file, target_png_file) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Verify independence and uniform distribution of discrete values in Python?

2021-07-09 Thread Ethan Furman
From Tim Peters: > `secrets` is just a wrapper around `random.SystemRandom`, so the > presence or absence of `secrets` doesn't matter. > > As to SystemRandom, all answers depend on the quality of the platform > os.urandom(), which Python has no control over. See my answer here, > and the comments

RFC for PEP 663: Improving and Standardizing Enum str(), repr(), and format() behaviors

2021-07-21 Thread Ethan Furman
PEP: 663 Title: Improving and Standardizing Enum str(), repr(), and format() behaviors Version: $Revision$ Last-Modified: $Date$ Author: Ethan Furman Discussions-To: python-...@python.org Status: Draft Type: Informational Content-Type: text/x-rst Created: 23-Feb-2013 Python-Version: 3.11 Post

Re: XML Considered Harmful

2021-09-21 Thread Ethan Furman
t: https://nestedtext.org/en/stable/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Subject: Re: Posts from gmane no longer allowed?

2021-09-26 Thread Ethan Furman
gmane stop sending posts). I am unaware of a change in the newsgroup <--> mailing list policy, and other newsgroup posts were coming through last week (it's been a light weekend). -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Posts from gmane no longer allowed?

2021-09-26 Thread Ethan Furman
On 9/26/21 10:34 AM, Grant Edwards wrote: > On 2021-09-26, Ethan Furman wrote: >> I am unaware of a change in the newsgroup <--> mailing list policy, >> and other newsgroup posts were coming through last week (it's been a >> light weekend). > > We're n

Re: New assignmens ...

2021-10-23 Thread Ethan Furman
other options didn't make it back to the PEP. Nevertheless, I recall the decision to start simple, and expand later if needed. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Ethan Furman
a very good name. So if someone has a good idea for a > name … > > The class starts a thread where every by the user defined interval a > by the user define function is called. How about `timed_repeat` or `repeat_timer`? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to check if there is internet?

2022-02-07 Thread Ethan Furman
it wouldn't surprise me if some >> sort of caching proxy system is deployed. > > Or the internet acquires a new protocol that's designed > for very-long-latency connections. RocketNet -- a massive store-and-forward protocol. ;-) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Aw: PYT - How can I subscribe to a topic in the mailing list?

2022-02-27 Thread Ethan Furman
useful, people would have to be diligent about setting them, which, quite frankly, I don't see happening -- some don't even set a useful subject line. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Behavior of the for-else construct

2022-03-03 Thread Ethan Furman
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote: > There are three types of programmer: those that can count, and those that can't. Actually, there are 10 types of programmer: those that can count in binary, and those that can't. -- ~Ethan~ -- https://mail.python.org/mai

PSA: Linux vulnerability

2022-03-08 Thread Ethan Furman
https://arstechnica.com/information-technology/2022/03/linux-has-been-bitten-by-its-most-high-severity-vulnerability-in-years/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-15 Thread Ethan Furman
atures are discussed). This particular desire has come up in the past, so you'll need to do some more research (i.e. find the previous threads on python-ideas) so you can answer objections already raised, or find new data supporting/refuting previous arguments. -- ~Ethan~ -- https://mail.pyt

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Ethan Furman
score. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

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