[Learning] Odoo super call dependency test

A test logs how Odoo process modules dependency with different install order

Test source code: https://github.com/NothingCtrl/odoo_super_dep_test

[BugFix] Python return incorrect MimeType for Js file under Windows 10

For unkown reason, python webserver return MimeType text/plain for all .js file when running under Windows 10

[Learning] The dangers of assert in Python (a.k.a know what you're doing!)

There are many ways to find bugs in Python code: the built-in debugger (pdb), a healthy amount of unit tests, a debugger in an IDE like Pycharm or Visual Studio, try/catch statements, if/else statements, assert statements, or the tried and true practice of covering every inch of your codebase in print() statements like it’s going out of style.

Assert statements can help us catch bugs quickly and are far less intrusive than copious amounts of print statements. However, unlike print statements, assert statements can be unexpectedly risky to use!

This article explores how to use asserts safely and what causes them to be unsafe. By the end of this article, you’ll know how to use assert most optimally without inadvertently opening yourself up to security issues.

[DiveIn] Deciphering Python: How to use Abstract Syntax Trees (AST) to understand code

Let’s get a little “meta” about programming.

How does the Python program (better know as the interpreter) “know” how to run your code? If you’re new to programming, it may seem like magic. In fact, it still seems like magic to me after being a professional for more than a decade.

The Python interpreter is not magic (sorry to disappoint you). It follows a predictable set of steps to translate your code into instructions that a machine can run.

[Learn] Hello World - the weirdest way!

Lòng vòng trên internet và lượm được, viết chương trình in ra "Hello world!" the weirdest way!

python hello_world.py
Hello World!

[eBook] A Complete Beginner's Guide to Django

Loạt bài viết chi tiết hướng dẫn xây dựng ứng dụng web với Django framework

Buggy Python Code: The 10 Most Common Mistakes That Python Developers Make

Source and author: https://www.toptal.com/python/top-10-mistakes-that-python-programmers-make

Python's simple, easy-to-learn syntax can mislead Python developers -- especially those who are newer to the language -- into missing some of its subtleties and underestimating the power of the language. In this article, Toptal's Martin Chikilian presents a "top 10" list of somewhat subtle, harder-to-catch mistakes that can trip up even the most advanced Python developer.