On Fri, Jul 10, 2020 at 02:50:17PM +1000, Chris Angelico wrote:

> And immediately above that part, I said that I had made use of this,
> and had used it in Python by listifying the dict first. Okay, so I
> didn't actually dig up the code where I'd done this, but that's a use
> case. I have *actually done this*. In both languages.

I'm not calling you a liar, I'm just pointing out that saying "I have 
done this" is not a use-case. You must have had a reason for *why* you 
did it, beyond just "because I can!" (or in this case, "because I can't, 
so I used a list instead").

It's the *why* that's important.

When we ask for use-cases, the implication is that contrived examples 
don't really count:

- to win a bet
- just out of curiosity, to see if it can be done (I've done this)
- to write obfuscated code
- to solve an exercise:

    "Exercise 7: choose a random key:value pair from 
    a dict, and print the result."

etc. So *on its own* the ability to choose a random key:value pair from 
a dict is not very compelling. If it were combined with a *why* then it 
could become a stronger example, presuming of course that this use-case 
would not be equally well served by listifying the key:value pairs 
first.

As I said, perhaps I just lack imagination.


-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7YT4V5H64H7CZMXSM3FEMQDQFZK3J22O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to