python | Unsorted

Telegram-канал python - Python

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

Subscribe to a channel

Python

Freecodecamp, i started here, a good free website.

Читать полностью…

Python

All I know is print("Hello World")

Читать полностью…

Python

chose an aspect of the language.
read up - write code - run tests - fix issues - understand the code - rinse and repeat

Читать полностью…

Python

Code isn’t given like candy here . Write your own and if youre stuck, then ask for help here.

Читать полностью…

Python

Can someone give me code

Читать полностью…

Python

What should I do to learn Python? Please help.

Читать полностью…

Python

vscode

there isn't the best, u use what u prefer

Читать полностью…

Python

I have multiple ip & port in excel & want to telnet multiple ip & port
How can I do it

Читать полностью…

Python

What happened with this place

Читать полностью…

Python

Not very helpful. Maybe a bit, considering the context.

Читать полностью…

Python

Why this happens

- Something defines its own init(self, age: int)

- Data is a @dataclass and does not declare age as a field

- Dataclasses generate their own init and do NOT automatically include parameters from the parent init

If age is part of Data, declare it in the dataclass and let it handle everything.


from dataclass import dataclass

@dataclass
class Something:
age: int

@dataclass
class Data(Something):
name: str

d = Data(name="John", age=30)
print(d)

Читать полностью…

Python

you can inherit with a dataclass, no issue 🤷‍♀️

Читать полностью…

Python

In [20]: im=Image.open("/home/user/Imágenes/mantra-machine-heliosphere.jpg")
In [26]: im.size
Out[26]: (1200, 1200)

Читать полностью…

Python

yeah Image.ImageFile.ImageFile should has the size property

Читать полностью…

Python

So... having this, yeah, i have questions, doesn't ImageFile.ImageFile have the size?

Читать полностью…

Python

i know the python basics basics

Читать полностью…

Python

Check out @PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.

Читать полностью…

Python

I really want to learn software development.

Читать полностью…

Python

No, because what you described is too broad. What have you tried where are you stuck?

Читать полностью…

Python

Check out @PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.

Читать полностью…

Python

i usually use pycharm or vscode but offer snippets

Читать полностью…

Python

Hello , what editors do you use in Python programming, which one is the best

Читать полностью…

Python

This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.

Читать полностью…

Python

Please don't ask meta questions like:

- Any user of $x here?
- Anyone used technology $y?
- Hello, I need help on $z!

Just ask about your problem directly! If you don't know what to ask, please read: http://catb.org/~esr/faqs/smart-questions.html

Читать полностью…

Python

Read rule #3 please!

Читать полностью…

Python

Perhaps depends on how it's being used

from dataclasses import dataclass


class Something:
def __init__(self, age: int):
self.age = age


@dataclass
class Data(Something):
name: str


d = Data(name="John", age=30)
print(d)

# Traceback (most recent call last):
# File "/home/user/test.py", line 14, in <module>
# d = Data(name="John", age=30)
# ^^^^^^^^^^^^^^^^^^^^^^^^^
# TypeError: Data.__init__() got an unexpected keyword argument 'age'

Читать полностью…

Python

i made the dataclass for organization, is not all the code, there are some other parameters inside that dataclass

Читать полностью…

Python

So why do you need a dataclass for something that is already supported on the library?

Читать полностью…

Python

It's not my fault if telegram doesn't indent.

Читать полностью…

Python

  File <string>:4
product_size: tuple[int, int]
^
IndentationError: unindent does not match any outer indentation level

Читать полностью…
Subscribe to a channel