moviepy icon indicating copy to clipboard operation
moviepy copied to clipboard

get rid of unpythonic imports!

Open chiboreache opened this issue 3 years ago • 4 comments

from moviepy import * --> import moviepy

chiboreache avatar Feb 20 '22 15:02 chiboreache

Could you explain what do you mean with this? You can import moviepy as you want.

mondeja avatar Mar 14 '22 10:03 mondeja

https://stackoverflow.com/questions/2386714/why-is-import-bad

chiboreache avatar Mar 17 '22 18:03 chiboreache

@mondeja I believe @chiboreache is refering to the example in the readme and those in the examples/ folder which use from moviepy import *.

I understand that this is not a great pattern to promote, but it makes the code more concise, in particular in the readme. It could be fixed in the example files, but I never went around to doing it.

Zulko avatar Mar 17 '22 18:03 Zulko

Ah sure, it seems that patterns like import moviepy as mp or import moviepy as mpy (to distinguish from matplotlib imports) would improve that.

mondeja avatar Mar 17 '22 18:03 mondeja