Python Code Review: LibreOffice Automation and the Python Standard Library

preview_player
Показать описание

Python Code Review: Unplugged – Episode 5: Code Review for Roger

This is a Python code review I did for Roger's LibreOffice automation script. I do a PEP 8 cleanup pass on the code and then start refactoring and extracting functions to make the program easier to read.

In one instance I was also able replace several lines of code with a built-in function from the Python standard library.

You can get the original and refactored version of Roger's script at the link below:

Did I miss anything? Anything that could be improved? Refactoring and talking at the same time is hard :) Leave a comment below and let me know!

* * *

FREE Python Tutorials & News:
Рекомендации по теме
Комментарии
Автор

I love the "messy code -> create function -> beutifully clean -> delete function" process jajaja :)

OmarMiranda
Автор

Love this video. Keep doing those kinds of tutorials.

bidochon
Автор

Don't really understand why it was necessary to make "TABS" global variable. Accessing something in the global space is pretty slow in python, so maybe it could be a good practice to avoid it?

alexeymegley
Автор

What is the plugin that you are using on ur terminal?

RonaldoMata_
Автор

What are yo using for Python scripting or REPL?

EmadMokhtar
Автор

I wonder how the process would look like if first we write a test, capture the result and then start to make changes :?

ivanpejic
Автор

For the format date function, the arrow module can give you way more flexibility with powerfull possibility with Time zone

Eryole