<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body text="#000000" bgcolor="#FFFFFF">
<p>Personally, I would be able to use the module you are proposing
to accumulate arbitrarily-named measures. I can not think of a use
case for division, but it would be nice for completion. I have
made my own library that implements a small part of what you
<p>I was looking through the pstats.py  source code; and I
thought it could benefit from vector operations. I have seen
other code that collect measures have the same redundant pattern.
Maybe some fancy regex can identify other += code sequences that
would benefit. If you make a module, and show how it can simplify
pstats.py, maybe you have a winner? <br>
 "vector" addition? -
<a class="moz-txt-link-freetext" href="https://github.com/klahnakoski/mo-dots/blob/dev/tests/test_dot.py#L610">https://github.com/klahnakoski/mo-dots/blob/dev/tests/test_dot.py#L610</a><br>
 pstats.py source code -
<a class="moz-txt-link-freetext" href="https://github.com/python/cpython/blob/3.7/Lib/pstats.py#L156">https://github.com/python/cpython/blob/3.7/Lib/pstats.py#L156</a><br>
<div class="moz-cite-prefix">On 2018-10-30 11:31, julien tayon
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre class="gmail-raw_message_text" id="gmail-raw_message_text">Hello :)
the idea is described here:
<a href="http://jul.github.io/cv/pres.html#printable" moz-do-not-send="true">http://jul.github.io/cv/pres.html#printable</a>
Summary of the idea :
Take a linear algebrae book, and implements all the rules as a TDD.
<a href="https://github.com/jul/archery/blob/master/consistent_algebrae.py" moz-do-not-send="true">https://github.com/jul/archery/blob/master/consistent_algebrae.py</a>
make it works based on abstract base class and sets of Mixins.
<a href="https://archery.readthedocs.io/en/latest/" moz-do-not-send="true">https://archery.readthedocs.io/en/latest/</a>
And see if we can make cos/__abs__/dot and if it gives naively the intended
results ? (spoiler: yes)
Making it work with dict, and "other" dictionary like counter by using
<a href="https://archery.readthedocs.io/en/latest/#advanced-usage" moz-do-not-send="true">https://archery.readthedocs.io/en/latest/#advanced-usage</a>
My idea is : wouldn't it be nice if we introduced geometries as sets of
mixins for objects ?
(Hilbertian algebrae could be nice too, and we could make MutableMapping
behave like bra/kets).
So I was proposing a soft discussion on : could we agree that it would be
nice to consider operation overloading as a whole set of behaviours that
could profit from being consistent in a categorized way ? (like the + of 
could be the + of "RecordAlgebrae")
Meaning we could define sets of "expected behaviour consistent interaction
between operators" as we defined the abc and call them algebrae?
I offer the LinearAlgebrae Mixins as a POC, and was thinking of creating a
unittest to qualify if an object is following the rules of linear algebrae.
What are your opinions ?
I don't actually see a lot of use case except it was funny to build. But
maybe it can be of use.
Python-ideas mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pythonfirstname.lastname@example.org">Pythonemail@example.com</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a>
Code of Conduct: <a class="moz-txt-link-freetext" href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a>