;
>
> pozdrawiam,
> Arkadiusz Bulski
>
>
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/code
e "state" in that "implicit input"). That would also be a great feature
when non-uniform (or external) random number generators are to be used.
This seem to be something that only shuffle gives some control (among the
functions we're talking about), or am I missing someth
d a really strong reason to migrate to Python 3 a proprietary legacy
code that isn't mine, and any "anti-functional" / "anti-expression" bias is
a strong reason not to do so. Also, it's worth noting that the "functional"
package in PyPI doesn't work on Python 3. Stuff
2016-11-06 18:00 GMT-02:00 Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp>:
> Danilo J. S. Bellini writes:
>
> > About the effort, do you really find the examples below with the new
> > proposed syntax difficult to understand?
>
> No. I just don't see
2016-11-06 23:55 GMT-02:00 Steven D'Aprano <st...@pearwood.info>:
> On Sun, Nov 06, 2016 at 04:46:42PM -0200, Danilo J. S. Bellini wrote:
>
> > 1.2. Sub-expressions in an expression might be on other statements (e.g.
> > assignments, other functions).
>
> Not in
ot;
(or any binary file viewer) with decimal output instead of hexadecimal?
I agree that mixing representations for the same abstraction (using decimal
in some places, hexadecimal in other ones) can be a bad idea. Actually,
that makes me believe "decimal unicode codepoint" shouldn't ever appear
te in some
sense. The advantages would be:
1 - The scan signature and the functools.reduce signature are the same (the
function as the first parameter, like map/filter)
2 - The module, functools, is the same that has the reduce function
--
Danilo J. S. Bellini
---
"*It is no
an use case because I sent links with several use cases, should I paste
their contents here? The PyScanPrev link (https://github.com/
danilobellini/pyscanprev) has several use case examples (including some
just for a comparison with other possible solutions) and even have a full
rationale for t
.python.org/pypi/pyscanprev
[3] https://groups.google.com/forum/#!topic/grupy-sp/wTIj6G5_5S0
[4]
https://github.com/danilobellini/pyscanprev/blob/v0.1.0/examples/conditional-toggling.rst
[5]
https://github.com/danilobellini/pyscanprev/blob/v0.1.0/examples/state-space.rst
[6] https://groups.goo
et the last item. There's no way
> around that.
>
Not if there's enough information to create the last value. Perhaps on the
it = iter(range(999)) one can get 2 values (call next(it) twice) and
use its __length_hint__ to create the last value. But I think only
sequences should have such an optimiz
d" on
endless iterables, it would behave like "last", doesn't it?
The whole point of this idea is the scan as a generator expression or
list/set comprehension that can access the previous iteration output.
Reduce/fold is just the last value of a scan, and the scan is sti
;
> But if it is indeed just reduce(), then it's even simpler.
>
> ChrisA
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/
n that matters seem to be a kind of social
status, not really "reason". I probably wrote way more reasons for that
proposal than annotations could ever have. But if no one seem to care
enough to read, then why should I insist? That's like my pprint bugfix
patch some months ago, was it appl
[0, 1]))
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
With the "windowed scan" syntax proposal, it would become:
>>> [fibs[-1] + fibs[-2] for unused in range(10) with fibs = [0, 1]]
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
Or:
>>> [fibs[-1] + fibs[-2] for unused in
ums, mul)
>
> Which is even shorter. It's feels very artificially contrived to insist
> that the initial element must live somewhere other than the iterator
> itself. But it would be easy enough to write a wrapper to massage an
> iterator for this special case:
>
> def prepend(item, i
insufficient.
Brendan, please see the PyScanPrev examples, mainly the Fibonacci and the
State-space model examples. Recursion is enough to give you that. The
proposal isn't about lag and windowing, but if you've got an idea to
improve that, I'd like to know.
2016-10-25 15:55 GMT-02:00 Rob Cliffe
tuple(a + b) # -> 0 1 2 3
AudioLazy does that: https://github.com/danilobellini/audiolazy
--
Danilo J. S. Bellini
---
"*It is not our business to set up prohibitions, but to arrive at
conventions.*" (R. Carnap)
___
P
/
> issue14384#msg316222 for examples and alternatives).
As attrgetter/itemgetter might get heterogeneus data, I would expect a
per-get default, not [just] a global default.
Perhaps something like:
>>> itemgetter(-1, 0, -2,
... default0="first argument default",
t; try:
... raise Exception("message")
... except Exception as exc:
... print(isinstance(exc, ExceptionHasMessage))
...
True
The idea is to allow catching exceptions beyond checking their MRO,
using a class that checks the exception instance by implementing
a custom
31 May 2018 at 06:29, Stephan Houben wrote:
> "[...] The exception matching machinery ignores the __instancecheck__
> mechanism."
>
The __subclasscheck__ gets bypassed, as well.
--
Danilo J. S. Bellini
---
"*It is not our business to set up prohibitions, but to arrive at
conve
trary "simplification" goal
(e.g. minimize the number of characters, only use English, ...).
IMHO, avoiding jargon sounds like avoiding teaching. In the case of new
Python stuff, avoiding the socially standardized terminology is an act of
isolation/seclusion.
--
Danilo J. S. Bellini
---
that it might be slow.
The alternatives are:
- exact, unbounded: Slower test
- not exact, unbounded: Probabilistic test
- exact, bounded: Default, raises OverflowError beyond 2**64
- not exact, bounded: Invalid, but it can just ignore exact input
--
Danilo J. S. Bellini
esult, I wrote this project, that adds the "scan" feature to Python
comprehensions using a decorator that performs bytecode manipulation (and
it had to fit in with a valid Python syntax): https://github.com/danilobelli
ni/pyscanprev
In that GitHub page I've wrote several examples and a rationa
2, 1, -1, -2], decay=.1, memory=5))
[5, 4.6, 4.34, 4.206, 3.9854, 3.68686, 3.218174, 2.6963566]
In that example, "y" is the "previous result" (a.k.a. accumulator, or what
had been called "average" here).
--
Danilo J. S. Bellini
---
"*It is not
quot; be
1-to-1 concepts (or neither)? How about symbolic links? I'm not sure, but
linking "absolute file name" to "module" sounds like endorsing the
relative-importable-from-external-scripts naming style, and IMHO that's not
the main issue. As packages with modules
body. But I can't do that
to all packages from other people, and having to change/monkeypatch
imported stuff in order to keep it working in this new Python version is
getting annoying already.
Perhaps adding a new kwarg to the "next" built-in to choose between a
"propagate" defa
Python 3.7.3, or at least a
single global configuration file for the REPL where I can put that oneliner
or a file reference with that line? I strongly prefer not to mess around
with ~/.bashrc, ~/.zshrc and scattered stuff like that, if possible.
--
Danilo J. S. Bellini
---
&q
unmatched
parentheses, because the "something" was filled by a TAB completion, and
the trailing open parenthesis wasn't expected (given that there's no such a
completion elsewhere).
--
Danilo J. S. Bellini
---
"*It is not our business to set up prohibitions, but to arrive at
ation (e.g. to avoid showing just a "**kwargs" when
the valid keyword arguments can be grabbed from the function that uses
them).
Regards,
Danilo J. S. Bellini
---
"*It is not our business to set up prohibitions, but to arrive at
conventions.*" (R. Carnap)
__
ier to find the default values, to count the parameters,
etc..
--
Danilo J. S. Bellini
___
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-idea
gt;> - Scientific Software Development
>> - Desktop GUI and Web Development
>> - wxPython, numpy, scipy, Cython
>> ___
>> Python-ideas mailing list -- python-ideas@python.org
>> To unsubscribe send an email to python-ideas-le...@python.or
thon-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/5QN2E5F3L4S2SEEWOF
32 matches
Mail list logo