Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
The important difference is that you don’t need to import anything in order to quickly use list type. This wins in the majority of the cases, unless I’m building something that will be imported by multiple other modules and it really pays to be that explicit.
That was definitely a nice feature (I forget exactly when list over List was added). That said I’ve never really been bothered about having imports. Especially when I know the import is side effect free like the typing module. But I definitely use import free list for script files without many lines of code.
The important difference is that you don’t need to import anything in order to quickly use
list
type. This wins in the majority of the cases, unless I’m building something that will be imported by multiple other modules and it really pays to be that explicit.That was definitely a nice feature (I forget exactly when list over List was added). That said I’ve never really been bothered about having imports. Especially when I know the import is side effect free like the typing module. But I definitely use import free list for script files without many lines of code.