Re: Syntax not understood

2021-11-04 Thread Chris Angelico
On Fri, Nov 5, 2021 at 6:45 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > But since it says "box", I would start by assuming that it has four > > elements. (They might be x1,y1,x2,y2 or x,y,w,h but it'll almost > > always be four.) So it's not TOO fragile, when working with boxes, but > > it i

Re: Syntax not understood

2021-11-04 Thread 2QdxY4RzWzUUiLuE
On 2021-11-05 at 06:28:34 +1100, Chris Angelico wrote: > On Fri, Nov 5, 2021 at 6:23 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > On 2021-11-04 at 14:36:48 -0400, > > David Lowry-Duda wrote: > > > > > > x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:]) > > > > > > >

Re: Syntax not understood

2021-11-04 Thread Chris Angelico
On Fri, Nov 5, 2021 at 6:23 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2021-11-04 at 14:36:48 -0400, > David Lowry-Duda wrote: > > > > x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:]) > > > > > > (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single >

Re: Syntax not understood

2021-11-04 Thread 2QdxY4RzWzUUiLuE
On 2021-11-04 at 14:36:48 -0400, David Lowry-Duda wrote: > > x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:]) > > > > (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single > > object, it should not be possible to unpack it into 2 variables. > > If you know the

Re: Syntax not understood

2021-11-04 Thread David Lowry-Duda
> x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:]) > > (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single > object, it should not be possible to unpack it into 2 variables. If you know the exact number of values in the generator, you can do this. Here is an

Re: Syntax not understood

2021-11-04 Thread ast
Le 04/11/2021 à 16:41, Stefan Ram a écrit : ast writes: (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single object, it should not be possible to unpack it into 2 variables. But the value of the right-hand side /always/ is a single object! A syntax of an assignment state

Syntax not understood

2021-11-04 Thread ast
Hello In this function def get4(srcpages): scale = 0.5 srcpages = PageMerge() + srcpages x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:]) for i, page in enumerate(srcpages): page.scale(scale) page.x = x_increment if i & 1 else 0 page.y

Re: Recursion on list

2021-11-04 Thread Peter Pearson
On Thu, 4 Nov 2021 08:57:14 +0100, ast wrote: > > li = [] > > li.append(li) > > li > [[...]] > > >li[0][0][0][0] > [[...]] > > That's funny After the coming AI upheaval, such cruelty to machines will be considered punishable and not funny. -- To email me, substitute nowhere->runbox, invalid->c

Recursion on list

2021-11-04 Thread ast
> li = [] > li.append(li) > li [[...]] >li[0][0][0][0] [[...]] That's funny -- https://mail.python.org/mailman/listinfo/python-list

Re: Recursion on list

2021-11-04 Thread Pieter van Oostrum
ast writes: >> li = [] >> li.append(li) >> li > [[...]] > >>li[0][0][0][0] > [[...]] > > That's funny > You made a list whose only element is itself. In [1]: li = [] In [3]: li.append(li) In [4]: li[0] is li Out[4]: True -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8D

First Ever FlaskCon Tickets Sales

2021-11-04 Thread Abdur-Rahmaan Janhangeer
Greetings list, I count my events-related posts to the mailing list. But i'd like to make an exception for FlaskCon this year. As the first ever tickets sales is ongoing: https://ti.to/flaskcon/flaskcon-2021 Python fans, please forward / tweet the message. Any questions, ping me! Kind Regards