python-tutorial icon indicating copy to clipboard operation
python-tutorial copied to clipboard

switch to python >=3.7 and use f-strings

Open Akuli opened this issue 4 years ago • 12 comments

Akuli avatar Jul 26 '20 15:07 Akuli

Use github project feature to manage this project with kan-ban strategy

sam4u3 avatar Jul 26 '20 16:07 sam4u3

Hi @Akuli , could you describe what needs to be changed?

sachindavra avatar May 08 '21 17:05 sachindavra

  • f strings in handy-stuff-strings.md
  • add dataclasses to advanced/datatypes.md, consider removing named tuples
  • anything else I forgot?

Akuli avatar May 08 '21 20:05 Akuli

is someone working on this already? I want to help!

laysauchoa avatar May 21 '21 21:05 laysauchoa

Just do it then :) If multiple people do it, I will combine the changes.

Akuli avatar May 21 '21 21:05 Akuli

I'm working on this if you have any updates please let me know.

tusharkhatriofficial avatar Sep 10 '22 16:09 tusharkhatriofficial

Nice :)

Don't add dataclasses yet. I probably want to restructure things a bit before adding dataclasses. Basically, I think the basics/advanced splitting as it is now doesn't make much sense, and it would be better to have something like basics/intermediate where intermediate would contain things like list/dict/set comprehensions, dataclasses, inheritance, typing, and so on.

Akuli avatar Sep 10 '22 18:09 Akuli

Intermediate section is indeed a good idea!

tusharkhatriofficial avatar Sep 10 '22 19:09 tusharkhatriofficial

Do you want to replace the old method with f-Strings or just add an extra f-Strings section?

tusharkhatriofficial avatar Sep 10 '22 19:09 tusharkhatriofficial

We don't need .format() or % formatting anymore, at least not in the basics section.

Akuli avatar Sep 10 '22 19:09 Akuli

There's still % formatting in these files:

advanced/functions.md
advanced/magicmethods.md
basics/answers.md
basics/defining-functions.md
basics/exceptions.md
basics/larger-program.md
basics/loops.md
basics/modules.md

Akuli avatar Sep 18 '22 20:09 Akuli

sure, I'll replace them asap

tusharkhatriofficial avatar Sep 18 '22 20:09 tusharkhatriofficial

This is done now. Thanks @tusharkhatriofficial for working on this!

Akuli avatar Sep 23 '22 18:09 Akuli