Slthy / Microplus-Lenex

Web scraper and Lenex encoder for swimming events hosted by Microplus s.r.l
MIT License
1 stars 0 forks source link

Return immutable tuple instead of list #13

Closed CremaLuca closed 1 year ago

CremaLuca commented 1 year ago

Nella funzione utils.url restituisci una lista mutabile https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/utils.py#L85

Siccome sarà sempre lunga 2 consiglio ritornare una tupla (immutabile) così anche da facilitarne l'unpacking: https://github.com/Slthy/Microplus-Lenex/blob/b6380314e274b9a568c6320ebd00d117442f74a9/functions.py#L12-L14 se restituisci una tupla può diventare

base_url, event = utils.url(url)

Basta che cambi le parentesi da quadre a tonde

Slthy commented 1 year ago

vero, ma a questo punto preferisco modificare direttamente la stringa, piuttosto che usare una funzione.