@miguendes
Machine Learning Software Engineer - Hobbyst Technical Writer - Interested in Software Testing, Best Practices, Scalability, and Python.
AI Software Engineer based in London, UK with 6+ years of professional experience developing and releasing software in different programming languages - Hobbyist Technical Writer - Interested in Software Testing, Best Practices, Scalability, Machine Learning/AI, and Python.
Nothing here yet.
Bem legal teu artigo, Lucas! Eu já passei por muito problema assim, até descobrir o pyenv. Ele possibilita ter mais de uma instalação do Python no computador sem precisar instalar no sistema operacional. Tudo fica dentro da tua $HOME. Inclusive fiz um post sobre ele e caso queira ver como é, o link é este: https://miguendes.me/how-i-set-up-my-python-workspace Abraços e continue postando!
Thanks HEE JAE CHOI , and yes, this is a typo! Thanks for flagging it, I've just fixed it. I renamed it before publishing to make it easier to understand and forgot to double check it in IPython. This is the correct version: def flatten_recursive ( lst: List[Any] ) -> Iterable[Any]: """Flatten a list using recursion.""" for item in lst: if isinstance(item, list): yield from flatten_recursive(item) else : yield item
Hi Roach Zhao , alpha must be None for it to work. If you make it like this alpha: Optional[float] = None then your code will work. I've updated the article, thanks for you comment. In [ 1 ]: from dataclasses import dataclass ...: from typing import Optional In [ 2 ]: In [ 2 ]: @dataclass ...: class Color : ...: """A regular class that represents a color.""" ...: r: float ...: g: float ...: b: float ...: alpha: Optional[float] = None ...: In [ 3 ]: blue = Color(r= 0 , g= 0 , b= 255 ) In [ 4 ]: blue Out[ 4 ]: Color(r= 0 , g= 0 , b= 255 , alpha= None )