135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
i made the dataclass for organization, is not all the code, there are some other parameters inside that dataclass
Читать полностью…
So why do you need a dataclass for something that is already supported on the library?
Читать полностью…
File <string>:4Читать полностью…
product_size: tuple[int, int]
^
IndentationError: unindent does not match any outer indentation level
@dataclassЧитать полностью…
class Background(ImageFile.ImageFile):
name: str
product_size: tuple[int, int]
image: ImageFile.ImageFile
:)
i know the existance of cpython library, nothing else 🤣😅
Читать полностью…
Although normally i dont use inheritance with dataclasses
Читать полностью…
question
i have a dataclass which inherits the ImageFile class from pillow and has an an "image" attribute... can i access to the dataclass.image properties just using dataclass.properties? if I haven't made myself clearm, i'm sorry
In [20]: im=Image.open("/home/user/Imágenes/mantra-machine-heliosphere.jpg")
In [26]: im.size
Out[26]: (1200, 1200)
Читать полностью…
yeah Image.ImageFile.ImageFile should has the size property
Читать полностью…
So... having this, yeah, i have questions, doesn't ImageFile.ImageFile have the size?
Читать полностью…
why dont you open ipython and see for yourself and inspect the object?
Читать полностью…
i used it (never used before) just for this semplification that i could do but idk if i can really do it
Читать полностью…
looks like you need an offtopic group, please delete the off-topic message(s) and continue this conversation at @pythonofftopic
Читать полностью…