Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Python has built-in functions and object that users can use directly (no need to import). However, if you import another module which hide a built-in function or object, you cannot use it anymore. For example, sum is a built-in function in Python which can be used directly. However, if you use PySpark import SQL functions (from pyspark.sql.functions import *), the built-in function sum is hidden by the PySpark SQL function sum. You can still use the built-in function sum by importing the builtins module.

import builtins

builtins.sum([1, 2, 3])
6
builtins.sum is sum
True