Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Oct 13, 2023

trns_im = Image()._new(core.new(self.mode, (1, 1)))

can be replaced with

trns_im = new(self.mode, (1, 1))

because that is what new() would do in this case.

This requires variables called new to be renamed in the surrounding code to avoid overlap, but that sounds like a good idea anyway.

@hugovk hugovk merged commit 5666c05 into python-pillow:main Oct 13, 2023
@radarhere radarhere deleted the new branch October 13, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants