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
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:])
> > > >
> > >
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
>
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
> 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
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
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
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
> li = []
> li.append(li)
> li
[[...]]
>li[0][0][0][0]
[[...]]
That's funny
--
https://mail.python.org/mailman/listinfo/python-list
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
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
11 matches
Mail list logo