Le mardi 6 mars 2018 00:29:25 UTC+1, Roel Schroeven a écrit :
> Sébastien Boisgérault schreef op 5/03/2018 20:05:
> > I have released bitstream, a Python library to manage binary data (at the
> > byte or bit level),
> > hopefully without the pain that this kind of thing usually entails :)
> >
>
This thought occurred to me several times, but I could not decide to write.
And since `filter` is a builtin, I think this change should be discussed
here, before opening an issue on bug tracker.
I propose to delete all references in the `filter` documentation that the
first argument can be `None`,
Hi Lawrence,
Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Sébastien Boisgérault wrote:
> > I have released bitstream, a Python library to manage binary data
> > (at the byte or bit level), hopefully without the pain that this
2018-03-05 17:34 GMT+03:00 Chris Angelico :
> In theory, the CPython bytecode compiler (don't know about other
> Python implementations) could just add these as constants. They'd then
> be bound at either compile time or function definition time (by
> default the former, I think, but the latter wo
Le mardi 6 mars 2018 09:26:50 UTC+1, Sébastien Boisgérault a écrit :
> Le mardi 6 mars 2018 00:29:25 UTC+1, Roel Schroeven a écrit :
> > Sébastien Boisgérault schreef op 5/03/2018 20:05:
> > > I have released bitstream, a Python library to manage binary data (at the
> > > byte or bit level),
> >
On 03/05/2018 07:44 PM, Terry Reedy wrote:
On 3/5/2018 9:34 AM, Chris Angelico wrote:
On Tue, Mar 6, 2018 at 12:52 AM, Terry Reedy wrote:
On 3/5/2018 7:12 AM, Kirill Balunov wrote:
# 1. By passing through local variable's default values
def func_local_1(numb, _int = int, _float = floa
Le mardi 6 mars 2018 10:23:02 UTC+1, Lawrence D’Oliveiro a écrit :
> On Tuesday, March 6, 2018 at 9:59:55 PM UTC+13, Sébastien Boisgérault wrote:
> >
> > Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> >
> >> On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Sébastien Boisgéraul
2018-03-05 21:44 GMT+03:00 Terry Reedy :
> Yes, what we really want for this sort of thing are unrebindable local
> constants. A simple syntax change could do it.
>
> def func_local_1(numb; int = int, float = float, range = range):
>
> The binding after ';' belong in the header because they sho
On Tue, Mar 6, 2018 at 8:02 PM, Kirill Balunov wrote:
>
>
> 2018-03-05 17:34 GMT+03:00 Chris Angelico :
>>
>> In theory, the CPython bytecode compiler (don't know about other
>> Python implementations) could just add these as constants. They'd then
>> be bound at either compile time or function de
On 3/6/2018 3:58 AM, Sébastien Boisgérault wrote:
Hi Lawrence,
Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Sébastien Boisgérault wrote:
I have released bitstream, a Python library to manage binary data
(at the byte or bit l
On Tue, Mar 6, 2018 at 7:52 PM, Kirill Balunov wrote:
> This thought occurred to me several times, but I could not decide to write.
> And since `filter` is a builtin, I think this change should be discussed
> here, before opening an issue on bug tracker.
>
> I propose to delete all references in t
Le mardi 6 mars 2018 11:15:15 UTC+1, Terry Reedy a écrit :
> On 3/6/2018 3:58 AM, Sébastien Boisgérault wrote:
> > Hi Lawrence,
> >
> > Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> >> On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Sébastien Boisgérault
> >> wrote:
> >>> I
On Tue, 06 Mar 2018 11:52:22 +0300, Kirill Balunov wrote:
> I propose to delete all references in the `filter` documentation that
> the first argument can be `None`, with possible depreciation of `None`
> as the the first argument - FutureWarning in Python 3.8+ and deleting
> this option in Python
2018-03-06 14:17 GMT+03:00 Steven D'Aprano <
[email protected]>:
> On Tue, 06 Mar 2018 11:52:22 +0300, Kirill Balunov wrote:
>
> > I propose to delete all references in the `filter` documentation that
> > the first argument can be `None`, with possible depreciation of `None`
> >
2018-03-06 13:18 GMT+03:00 Chris Angelico :
> The identity function is:
>
> filter(lambda x: x, range(10))
>
> How is it consistent with truthiness? Exactly the same way the
> underlying object is. There's no requirement for the predicate
> function to return True or False - it's perfectly accepta
Kirill Balunov wrote:
>
> As I wrote, __possible depreciation__, I also do not see the point of just
It's 'deprecation', depreciation is something quite different. People
replying have spelt it correctly so you might possibly have noticed I
thought/hoped.
... and it does matter a bit because i
On Wed, Mar 7, 2018 at 12:23 AM, Kirill Balunov wrote:
> Filter is generally faster than list comprehension or generators.
>
> %timeit [*filter(lambda x: x % 3, range(1000))]
> 100 µs ± 16.4 ns per loop (mean ± std. dev. of 7 runs, 1 loops each)
>
> f = lambda x: x % 3
>
> %timeit [*(f(i) for
On Tue, Mar 6, 2018 at 1:52 AM, Kirill Balunov
wrote:
>
> I propose to delete all references in the `filter` documentation that the
> first argument can be `None`, with possible depreciation of `None` as the
> the first argument - FutureWarning in Python 3.8+ and deleting this option
> in Python
2018-03-06 16:51 GMT+03:00 Chris Angelico :
> On Wed, Mar 7, 2018 at 12:23 AM, Kirill Balunov
> wrote:
> > Filter is generally faster than list comprehension or generators.
> >
> > %timeit [*filter(lambda x: x % 3, range(1000))]
> > 100 µs ± 16.4 ns per loop (mean ± std. dev. of 7 runs, 1 loo
2018-03-06 16:35 GMT+03:00 Chris Green :
> It's 'deprecation', depreciation is something quite different. People
> replying have spelt it correctly so you might possibly have noticed I
> thought/hoped.
>
> ... and it does matter a bit because it's not just a mis-spelling, the
> word you are using
Chris Angelico wrote:
> On Tue, Mar 6, 2018 at 10:04 AM, Steven D'Aprano
> wrote:
>> # Later.
>> if __name__ = '__main__':
>> # Enter the Kingdom of Nouns.
>
> Don't you need a NounKingdomEnterer to do that for you?
No, for some extra flexibility there should be a NounKingdomEntererFactory
Thank you, Steven.
> There is a feature-request to support that (as Python 2.7 does):
>
> https://bugs.python.org/issue12029
>
> but it is stalled.
I passed over the ticket.
Now, I know that this is a bug, but has not fixed yet.
There are (or ware ?) problems about performance and integrity for
2018-03-06 16:58 GMT+03:00 Jason Friedman :
>
> as a ordinary Python user I'd be interested in improvements to the
> documentation, including suggestions on real-world usage.
>
I'm just an ordinary user, just like you :)
> Kirill, taking deprecation/removal off the table, what changes would you
On Wed, Mar 7, 2018 at 1:48 AM, Kirill Balunov wrote:
> Note: For some historical reasons as the first argument you can use None
> instead of function, in this case the identity function is assumed. That
> is, all elements of iterable that are false are removed which is equivalent
> to (item for i
2018-03-06 17:55 GMT+03:00 Chris Angelico :
> On Wed, Mar 7, 2018 at 1:48 AM, Kirill Balunov
> wrote:
> > Note: For some historical reasons as the first argument you can use None
> > instead of function, in this case the identity function is assumed. That
> > is, all elements of iterable that are
On Wed, Mar 7, 2018 at 2:12 AM, Kirill Balunov wrote:
>
>
> 2018-03-06 17:55 GMT+03:00 Chris Angelico :
>>
>> On Wed, Mar 7, 2018 at 1:48 AM, Kirill Balunov
>> wrote:
>> > Note: For some historical reasons as the first argument you can use None
>> > instead of function, in this case the identity
2018-03-06 17:55 GMT+03:00 Chris Angelico :
> If the first argument is None, the identity function is assumed. That
> is, all elements of the iterable that are false are removed; it is
> equivalent to (item for item in iterable if item). It is approximately
> equivalent to (but faster than) filter
On Wed, Mar 7, 2018 at 2:33 AM, Kirill Balunov wrote:
>
>
> 2018-03-06 17:55 GMT+03:00 Chris Angelico :
>>
>> If the first argument is None, the identity function is assumed. That
>> is, all elements of the iterable that are false are removed; it is
>> equivalent to (item for item in iterable if i
Chris Angelico wrote:
> On Wed, Mar 7, 2018 at 2:12 AM, Kirill Balunov
> wrote:
>>
>>
>> 2018-03-06 17:55 GMT+03:00 Chris Angelico :
>>>
>>> On Wed, Mar 7, 2018 at 1:48 AM, Kirill Balunov
>>> wrote:
>>> > Note: For some historical reasons as the first argument you can use
>>> > None instead of f
On Monday, 5 March 2018 23:06:53 UTC, Steven D'Aprano wrote:
> On Mon, 05 Mar 2018 09:22:33 -0800, Ooomzay wrote:
> [...]
> > If you would like to have a shot at coding this without RAII, but
> > preserving the OO design, you will find that it is considerably
> > simpler than the with/context man
Sébastien Boisgérault schreef op 6/03/2018 10:23:
I had a look at the AIS message format from your link(https://en.wikipedia.org/wiki/Automatic_identification_system#Message_format) and this seems to be a nice use case; all the data components seem to be nicely aligned on the byte boundary ... unt
On Wed, Mar 7, 2018 at 9:09 AM, Ooomzay wrote:
>> I'm not trying to dissuade you from using RAII in your own applications,
>> if it works for you, great.
>
> Unfortunately, despite having conquered it, without a _guarantee_ of this
> behaviour from the language, or at least one mainstream implemen
On Tue, 06 Mar 2018 14:09:53 -0800, Ooomzay wrote:
> Unfortunately, despite having conquered it, without a _guarantee_ of
> this behaviour from the language, or at least one mainstream
> implementation, I will not invest in python again.
Oh well, so sad. See you later.
--
Steve
--
https://ma
Whenever I try to open the python shell it says IDLE’s subprocess didn’t make a
connection. Everything worked fine yesterday and I haven’t done anything I
think would cause this problem. Any way to fix this? I’ve tried repairing and
redownloading
--
https://mail.python.org/mailman/listinfo/pyth
On 3/6/2018 6:00 PM, Jeremy Jamar St. Julien wrote:
Whenever I try to open the python shell it says IDLE’s subprocess didn’t make a
connection.
You must be referring to IDLE's GUI Shell, not Python's normal console
text (TUI?) shell or REPL.
IDLE normally runs its GUI in one process and you
Hello,
with 3.6 and latest greatest lxml:
from lxml import etree
tree = etree.parse('Sample.xml')
etree.register_namespace('','http://www.example.com')
causes:
Traceback (most recent call last):
File "/home/az/Work/flask/tutorial_1/src/xml_oper.py", line 16, in
etree.register_namespace('
On Tue, 06 Mar 2018 23:03:15 -0500, Andrew Z wrote:
> Hello,
> with 3.6 and latest greatest lxml:
>
> from lxml import etree
>
> tree = etree.parse('Sample.xml')
> etree.register_namespace('','http://www.example.com')
> it seems to not be happy with the empty tag . But i'm not sure why and
> h
On Tuesday, 6 March 2018 14:12:38 UTC, Peter Otten wrote:
> Chris Angelico wrote:
>
> > On Tue, Mar 6, 2018 at 10:04 AM, Steven D'Aprano
> > wrote:
> >> # Later.
> >> if __name__ = '__main__':
> >> # Enter the Kingdom of Nouns.
> >
> > Don't you need a NounKingdomEnterer to do that for you?
On Wednesday, 7 March 2018 06:43:10 UTC, Ooomzay wrote:
> On Tuesday, 6 March 2018 14:12:38 UTC, Peter Otten wrote:
> > Chris Angelico wrote:
> >
> > > On Tue, Mar 6, 2018 at 10:04 AM, Steven D'Aprano
> > > wrote:
> > >> # Later.
> > >> if __name__ = '__main__':
> > >> # Enter the Kingdom o
39 matches
Mail list logo