[Python-Dev] Re: Switching to Discourse

2022-12-04 Thread Barney Gale
Perspective from a minor Python contributor:

The only thing worse than email or Discourse is email AND Discourse.
Fragmented communities are a nightmare. I don't want to post to multiple
places in order to reach the devs. Its hard enough to build consensus
already. The relative strengths of email vs discourse pale in comparison to
the dangers of fragmentation IMO.

I prefer mailing lists personally, but theyve been losing out to web forums
for 20 years now. In my view, switching solely to Discourse would help
ensure the vitality of the Python community for years to come.

Barney


On Sat, 3 Dec 2022, 21:31 Baptiste Carvello, <
[email protected]> wrote:

> Le 02/12/2022 à 18:49, Brett Cannon a écrit :
> >
> > Since we are promoting/pushing folks to use discuss.python.org
>
> Until now I've seen more "pushing" (with sticks) than "promoting" (with
> carrots).
>
> Since august I've been looking for a way to follow the discussions on
> discourse without using the heavy and annoying web interface, or
> building a whole stack of filters on my side. It's annoyingly close to
> working with RSS: "posts.rss" would just need to keep entries for a
> longer time, and include category information.
>
> I regret that there seems to be zero interest in fixing those last
> glitches and making RSS really work.
>
> >  it means this mailing list starts to feel
> > like more of a burden/excess.
>
> The "burden" of keeping one additional list on an existing platform is
> moderate. Nobody would be forced to read it, but interesting ideas would
> surely be copied over to discourse at some point.
>
> All the death clamors are way premature, and either relate to the
> "sticks" tactics, or to the usual intolerance of "modern tools" converts.


> Baptiste
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/UT5T4PZ6KEB7EQXLK3ZE6ZK2U6S37AKT/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/D3HCWJF7NDCANFMGPSNTP4S64RECF4XO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: A proposal to modify `None` so that it hashes to a constant

2022-12-04 Thread Rob Cliffe via Python-Dev

Wild suggestion:
    Make None.__hash__ writable.
E.g.
    None.__hash__ = lambda : 0 # Currently raises AttributeError: 
'NoneType' object attribute '__hash__' is read-only

Best wishes
Rob Cliffe

On 01/12/2022 11:02, Oscar Benjamin wrote:

On Thu, 1 Dec 2022 at 06:56, Chris Angelico  wrote:

On Thu, 1 Dec 2022 at 17:26, Yoni Lavi  wrote:

So it's not like it's even possible to require this generally for all objects.

Well, I mean, in theory you could require that objects whose hash
isn't otherwise defined get given the hash of zero. That doesn't
violate any of the actual rules of hashes, but it does make those
hashes quite suboptimal :)

It's interesting how id() and hash() have opposite requirements (id
must return a unique number among concurrently-existing objects, hash
must return the same number among comparing-equal objects), yet a hash
can be built on an id.

This also demonstrates a significant reason why None is special: it's
a singleton that only compares equal to itself. The reason for using
id for hash in other cases is to make different instances have
different hashes but there is only ever one instance of None. A
singleton class can have a hash function that matches identity based
equality without using id: any constant hash function will do.

--
Oscar
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/MTTJJN2HHP3A264DN3CAWSXITHRMLLUW/
Code of Conduct: http://python.org/psf/codeofconduct/


___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/XRASAGN52DAM7EAKJOYSWHJEKFAP2JPT/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: A proposal to modify `None` so that it hashes to a constant

2022-12-04 Thread Chris Angelico
On Mon, 5 Dec 2022 at 05:11, Rob Cliffe via Python-Dev
 wrote:
>
> Wild suggestion:
>  Make None.__hash__ writable.
> E.g.
>  None.__hash__ = lambda : 0 # Currently raises AttributeError:
> 'NoneType' object attribute '__hash__' is read-only

Hashes have to be stable. If you change the hash of None after it's
been inserted into a dictionary, you'll get all kinds of entertaining
problems.

>>> class X:
... def __init__(self): self.hash = 0
... def __hash__(self): return self.hash
...
>>> x = X()
>>> d = {x: "This is x"}
>>> x.hash = 1
>>> for key in d: print(key, key in d)
...
<__main__.X object at 0x7f2d07c6f1c0> False

ChrisA
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/OVVIKTG7CBN6BII4OBGIXWQJJXYCEO3I/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Switching to Discourse

2022-12-04 Thread Baptiste Carvello
Le 04/12/2022 à 16:55, Barney Gale a écrit :
> 
> I don't want to post to multiple
> places in order to reach the devs.

Nobody proposed that. In order to reach the devs, you use discourse (or
have someone else do it on your behalf).

Just let the "second circle" of the community keep their mailing list,
as this second circle just won't switch to a specialized, and quite
unflexible tool.

Yeah, without most core devs, this list might be more akin to
python-ideas than the old python-dev. But it makes sense to keep the
bigger following it has grown over the years.

> I prefer mailing lists personally, but theyve been losing out to web
> forums for 20 years now.

This is historically untrue. In technical communities, web forums have
been considered second class tools until some 5 years ago, with
mailing-lists being seen as lighter, more flexible and more capable.

Then they began loosing to *heavily moderated* web forums because of the
insistence on moderation. Yeah, smartphones with no capable mail client
played a role too.

Cheers,
Baptiste
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/A2667BXDXYU5TXG535IUSWI6WRC35DIB/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Switching to Discourse

2022-12-04 Thread Barney Gale
Oh brilliant. I'll unsubscribe from this list then. It sounds like the only
people using it will be those folks who think their tooling preferences are
more important than creating a joined-up Python community; I can survive
without their input.


On Sun, 4 Dec 2022, 19:53 Baptiste Carvello, <
[email protected]> wrote:

> Le 04/12/2022 à 16:55, Barney Gale a écrit :
> >
> > I don't want to post to multiple
> > places in order to reach the devs.
>
> Nobody proposed that. In order to reach the devs, you use discourse (or
> have someone else do it on your behalf).
>
> Just let the "second circle" of the community keep their mailing list,
> as this second circle just won't switch to a specialized, and quite
> unflexible tool.
>
> Yeah, without most core devs, this list might be more akin to
> python-ideas than the old python-dev. But it makes sense to keep the
> bigger following it has grown over the years.
>
> > I prefer mailing lists personally, but theyve been losing out to web
> > forums for 20 years now.
>
> This is historically untrue. In technical communities, web forums have
> been considered second class tools until some 5 years ago, with
> mailing-lists being seen as lighter, more flexible and more capable.
>

Invision Power Board, PHPBB and others supplanted mailing lists in the
early 00s. Programming communities took longer because they
disproportionately attract folks with strong and inflexible preferences.

>
> Then they began loosing to *heavily moderated* web forums because of the
> insistence on moderation. Yeah, smartphones with no capable mail client
> played a role too.
>
> Cheers,
> Baptiste
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/A2667BXDXYU5TXG535IUSWI6WRC35DIB/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/64HZ4CAVBEMIAPHG5ZLQ66ZPQKKONY3E/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: A proposal to modify `None` so that it hashes to a constant

2022-12-04 Thread Steven D'Aprano
On Thu, Dec 01, 2022 at 10:18:49PM +, Rob Cliffe via Python-Dev wrote:

> Wild suggestion:
>     Make None.__hash__ writable.
> E.g.
>     None.__hash__ = lambda : 0 # Currently raises AttributeError: 
> 'NoneType' object attribute '__hash__' is read-only

You would have to write to `type(None).__hash__` because of the way 
dunders work.

Now imagine that you have twenty different libraries or functions or 
classes, each the `__hash__` method to a different function. Chaos.

You can simulate that chaos with this:

```
import random

class ChangingHash:
def __repr__(self):
return "MyNone"
def __hash__(self):
# Simulate the effect of many different callers changing
# the hash value returned at unpredictable times.
return random.randint(1, 9)

MyNone = ChangingHash()

data = {MyNone: 100}
print(MyNone in data)  # 8 in 9 chance of printing False
data[MyNone] = 200
print(data)  # 8 in 9 chance of {MyNone: 100, MyNone: 200}
print(MyNone in data)  # now 7 in 9 chance of printing False
```


-- 
Steve
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/ZEQFHMIQJIO5AWYTLSW7PKPZE2RZMJMY/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Switching to Discourse

2022-12-04 Thread Steven D'Aprano
On Sun, Dec 04, 2022 at 08:20:56PM +, Barney Gale wrote:

> Oh brilliant. I'll unsubscribe from this list then. It sounds like the only
> people using it will be those folks who think their tooling preferences are
> more important than creating a joined-up Python community; I can survive
> without their input.

My, what a hot take you have there.

Did you consider that we already had "a joined-up Python community" 
until a subset of people decided to split off to use Discuss to satisfy 
*their* tooling preferences?

https://www.youtube.com/watch?v=QhaY1hRDYBg

-- 
Steve
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/DSV7PTZBTG5WR4EQ63CJOTUKNZUSNK6S/
Code of Conduct: http://python.org/psf/codeofconduct/