On Sat, Dec 1, 2018 at 10:55 AM Morten W. Petersen wrote:
> But this raises the question of how to write Python code,
> short and sweet, that could handle infinite iterators in
> such an unpack with multiple variables to assign to.
>
> Which I guess is mostly theoretical, as there are other
> ways
On Sat, Dec 1, 2018 at 12:25 AM Chris Angelico wrote:
> On Sat, Dec 1, 2018 at 10:18 AM Morten W. Petersen
> wrote:
> >
> > On Fri, Nov 30, 2018 at 7:25 PM Dan Sommers <
> > 2qdxy4rzwzuui...@potatochowder.com> wrote:
> >
> > > On 11/30/18 12:00 PM, Morten W. Petersen wrote:
> > >
> > > > I gues
On 30/11/2018 23:40, Marko Rauhamaa wrote:
> Paul Rubin :
>> Maybe someone can convince me I'm misusing JSON but I often want to
>> write out a file containing multiple records, and it's convenient to
>> use JSON to represent the record data.
>>
>> The obvious way to read a JSON doc from a file is
On Sat, Dec 1, 2018 at 10:18 AM Morten W. Petersen wrote:
>
> On Fri, Nov 30, 2018 at 7:25 PM Dan Sommers <
> 2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> > On 11/30/18 12:00 PM, Morten W. Petersen wrote:
> >
> > > I guess syntax could be added, so that
> > >
> > > a, b, @c = some sequence
>
On Fri, Nov 30, 2018 at 7:25 PM Dan Sommers <
2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 11/30/18 12:00 PM, Morten W. Petersen wrote:
>
> > I guess syntax could be added, so that
> >
> > a, b, @c = some sequence
> >
> > would initialize a and b, and leave anything remaining in c. We cou
On Sat, Dec 1, 2018 at 9:46 AM Marko Rauhamaa wrote:
>
> Paul Rubin :
> > Maybe someone can convince me I'm misusing JSON but I often want to
> > write out a file containing multiple records, and it's convenient to
> > use JSON to represent the record data.
> >
> > The obvious way to read a JSON d
On 01Dec2018 00:40, Marko Rauhamaa wrote:
Paul Rubin :
Maybe someone can convince me I'm misusing JSON but I often want to
write out a file containing multiple records, and it's convenient to
use JSON to represent the record data.
The obvious way to read a JSON doc from a file is with "json.lo
Paul Rubin :
> Maybe someone can convince me I'm misusing JSON but I often want to
> write out a file containing multiple records, and it's convenient to
> use JSON to represent the record data.
>
> The obvious way to read a JSON doc from a file is with "json.load(f)"
> where f is a file handle. Un
On Sat, Dec 1, 2018 at 8:43 AM Benjamin Schollnick
wrote:
>
> Folks,
>
> Can anyone explain to me why RAR support isn’t available natively in python?
>
> We have the zipfile and tarfile modules…
>
> Yes, there is rarfile and PaTools but they both rely on RAR being available
> to shell out to…
> W
On Fri, 30 Nov 2018 16:42:06 -0500, Benjamin Schollnick wrote:
> Folks,
>
> Can anyone explain to me why RAR support isn’t available natively in python?
>
> We have the zipfile and tarfile modules…
>
> Yes, there is rarfile and PaTools but they both rely on RAR being available
> to shell out
Folks,
Can anyone explain to me why RAR support isn’t available natively in python?
We have the zipfile and tarfile modules…
Yes, there is rarfile and PaTools but they both rely on RAR being available to
shell out to…
What is it about RAR files that makes it unreasonable to handle in nativel
On 11/30/18 12:00 PM, Morten W. Petersen wrote:
> I guess syntax could be added, so that
>
> a, b, @c = some sequence
>
> would initialize a and b, and leave anything remaining in c. We could
> then call this @ syntax "teh snek".
Close. ;-) Try this:
a, b, *c = [4, 5, 6, 7]
--
https://ma
On Fri, Nov 30, 2018 at 6:21 PM Dan Sommers <
2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 11/30/18 10:57 AM, Morten W. Petersen wrote:
> > On Fri, Nov 30, 2018 at 4:25 PM Dan Sommers
> <2qdxy4rzwzuui...@potatochowder.com> wrote:
> [...]
> > But since you mention it, why is it necessary to en
On 11/30/18 10:57 AM, Morten W. Petersen wrote:
> On Fri, Nov 30, 2018 at 4:25 PM Dan Sommers
<2qdxy4rzwzuui...@potatochowder.com> wrote:
>> Python validates that the right hand side contains exactly the right
>> number of elements before beginning to unpack, presumably to ensure a
>> successfu
On Fri, Nov 30, 2018 at 4:25 PM Dan Sommers <
2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 11/30/18 7:35 AM, Morten W. Petersen wrote:
>
> > ... but isn't it logical that the
> > string is parsed and split, and then later the unpacking operation fails
> > with an IndexError?
>
> With slightly s
On 11/30/18 7:35 AM, Morten W. Petersen wrote:
... but isn't it logical that the
string is parsed and split, and then later the unpacking operation fails
with an IndexError?
With slightly simpler code and the full text of the exception,
the details becomes more apparent:
>>> x, y = [4]
Traceb
On Fri, Nov 30, 2018 at 4:02 PM Peter Otten <__pete...@web.de> wrote:
> Morten W. Petersen wrote:
>
> > I've been reading up on a bit of C++, Assembler etc. lately, so maybe my
> > mind expected an IndexError because of that, but isn't it logical that
> the
> > string is parsed and split, and the
Morten W. Petersen wrote:
> Hi there.
>
> I was adding a port specification feature to my surveil project as shown
> here:
>
>
https://github.com/morphex/surveil/commit/703318f87c4c450a37944b565a10718ef27b57b4
>
> A bit later I was surprised when the script raised an exception, and that
> I ha
Hi there.
I was adding a port specification feature to my surveil project as shown
here:
https://github.com/morphex/surveil/commit/703318f87c4c450a37944b565a10718ef27b57b4
A bit later I was surprised when the script raised an exception, and that I
had to catch a ValueError instead of an IndexErr
19 matches
Mail list logo