True, there'll always be people getting it wrong no matter what we do. However in this case I think that outplace set_ is deliberately obtuse and 'incorrect'. Feel free to correct me if you disagree?
Is there a better standard that we should switch to? I was planning on renaming them to .with_fps() and .with_layer() etc, but perhaps it would be better to make them inplace? What are the advantages and disadvantages with that?
Hey everyone, I asked this a few days ago, but I'd like some more input: I'm trying to improve the MoviePy API and I need some help re naming/conventions: Currently the central objects are various types of Clip. Clip has several methods such as .set_fps(), .set_layer() etc. Currently these methods work 'outplace' i.e. they don't modify the object, they return a new Clip with that modification done to it. This causes a lot of confusion because they don't act like you'd expect a 'setter' to.
Haha, well I've never done this before (and I didn't design the original moviepy api either), so I just want to check that what I'm planning makes sense!
We were also planning on using the object slicing methods to map to .subclip calls as well (so clip[2:10:-1] would play between t = 2 and t = 10, but backwards)
Indeed. There is also currently set_start and set_end methods that allow you to set where the clip should go if you are about to put it together into a CompositeVideoClip
My reservation is that as it is now you can do clip.set_fps(20).set_duration(10).set_layer(1).subclip(2, 20) all in one line. That wouldn't be possible if the methods are inplace?
Is there a better standard that we should switch to? I was planning on renaming them to .with_fps() and .with_layer() etc, but perhaps it would be better to make them inplace? What are the advantages and disadvantages with that?
Hey all, I'm trying to improve the MoviePy API and I've got a question about API naming/conventions: Currently the central objects are various types of Clip. Clip has several methods such as .set_fps(), .set_layer() etc. Currently these methods work 'outplace' i.e. they don't modify the object, they return a new Clip with that modification done to it. This causes a lot of confusion because they don't act like you'd expect a 'setter' to.
I'm just going through my old questions, and I found this one: stackoverflow.com/questions/44399788/. Its got 3 downvotes; should I just delete it or is it worth keeping?
No, its the name of a cyber security challenge program that I'm doing, and the question you asked is similar to one of the challenges in it. I was just curious if that is what you were doing as well
I'm just going through my old questions, and I found this one: stackoverflow.com/questions/44399788/…. Its got 3 downvotes; should I just delete it or is it worth keeping?