> On 7 Oct 2018, at 22:44, Guido van Rossum wrote:
>
> So someone ought to submit a PR that adds (brief) documentation for this,
> with reference to this thread.
I was trying to write this documentation when I noticed that the docs already
mention this! "The stmt and setup parameters can
Terry Reedy wrote (to comp.lang.python)
> https://paulromer.net/jupyter-mathematica-and-the-future-of-the-research-paper/
> Jupyter, Mathematica, and the Future of the Research Paper
> Paul Romer, new Nobel prize winner in economics, for research on how
> ideas interact with economic growth,
On Wed, Oct 10, 2018 at 11:29 AM Jonathan Fine wrote:
> Terry Reedy wrote (to comp.lang.python)
>
> >
> https://paulromer.net/jupyter-mathematica-and-the-future-of-the-research-paper/
> > Jupyter, Mathematica, and the Future of the Research Paper
> > Paul Romer, new Nobel prize winner in
Thanks for proposing this. Yes, it makes sense to have
unittest.AsyncTestCase in 3.8. AFAIK Lisa Roach (copied) was working
on that (as well as on async Mock object), but I'm not sure what's the
status of her work. I suggest to search for an open issue for this on
bugs.python.org; if there's
Hi, I first want to thank everyone in the community for the contributions
over the years. I know the idea of a frozendict has been proposed before
and rejected. I have a use case for a frozendict implementation that to my
knowledge was not discussed during previous debates. My reasoning for a
10.10.18 20:19, Yury Selivanov пише:
Thanks for proposing this. Yes, it makes sense to have
unittest.AsyncTestCase in 3.8. AFAIK Lisa Roach (copied) was working
on that (as well as on async Mock object), but I'm not sure what's the
status of her work. I suggest to search for an open issue for
Geoffrey Spear wrote:
> Is there an idea for Python hidden somewhere in this message?
Thank you, Geoffrey, for pointing this out. I'd have done better to
prefixed the title with OFF-TOPIC. That would have been more polite.
To answer your question: Django created a new community of Python
users.
One important difference between MappingProxyType and a "proper"
frozendict, as analog to frozenset, is that MappingProxyType doesn't have
any method to return mutated versions of itself.
On Thu, 11 Oct 2018 at 01:24, Steven D'Aprano wrote:
> Hi Philiip, and welcome,
>
> On Wed, Oct 10, 2018 at
In tri.struct we have a class Frozen
https://github.com/TriOptima/tri.struct/blob/master/lib/tri/struct/__init__.py
that can be used to freeze stuff. I think something like this would be even
better in the standard library, especially now with data classes! If we had
this frozendict would just
11.10.18 07:20, João Santos пише:
One important difference between MappingProxyType and a "proper"
frozendict, as analog to frozenset, is that MappingProxyType doesn't
have any method to return mutated versions of itself.
MappingProxyType.copy()?
Hi everyone and good morning to some of you,
Since asyncio and the async/await syntax are both part of Python, I think
that we should extend TestCase to support it. The simplest solution that
I can think of is to create unittest.AsyncTestCase sub-class with the
following extensions:
- create a
How does a frozendict help in that example? It's not obvious to me.
Despite not understanding that example, I'm +1 for having a frozendict. I
don't think it'll increase cognitive load much, as it'll sit right next to
frozenset when someone reads the builtins in alphabetical order. In my own
Hi Philiip, and welcome,
On Wed, Oct 10, 2018 at 12:04:48PM -0500, Philip Martin wrote:
> I generally have used MappingProxyType as a way to set default mapping
> to a function or to set an empty mapping to a function.
> I've created a gist with an example use case:
>
>
On 10Oct2018 20:25, Philip Martin wrote:
Steven, that's a great idea, and I would be 100% up for your suggestion to
have types.MappingProxyType renamed to frozendict.
I'm not for the rename, myself. Though I'd not be against a frozendict
factory in builtins, a tiny shim for MappingProxyType.
It would help over using a regular dict as a default argument to a function
by preventing accidental mutation of the default or constant mapping. This
is a quickly contrived example of the convert_price function now having a
side effect by changing the translation_map.
from unicodedata import
Steven, that's a great idea, and I would be 100% up for your suggestion to
have types.MappingProxyType renamed to frozendict. However, the differences
in the behavior of MappingProxyType's constructor versus dict's would make
the API's behavior confusing IMO. For example, MappingProxyType(x=5,
Cameron,
That's a good suggestion. Ultimately, if there are not enough various use
cases for a frozendict class, I think we could add something like this as
an example recipe similar to the recipe section in itertools. I would be
hesitant to add a quick shim to the standard library as I can't
On Thu, Oct 11, 2018 at 1:02 PM Cameron Simpson wrote:
>
> On 10Oct2018 20:25, Philip Martin wrote:
> >Steven, that's a great idea, and I would be 100% up for your suggestion to
> >have types.MappingProxyType renamed to frozendict.
>
> I'm not for the rename, myself. Though I'd not be against a
That is interesting. From my recollection, when OrderedDict was
reimplemented in C, there was advice on the thread to not implement it as a
subclass of dict.
https://bugs.python.org/issue16991
I'm far from the right person to comment on the exact reasons, but perhaps
frozenset being decoupled
19 matches
Mail list logo