2 ms·
Python can't replicate the structure of this JavaScript code: fooBaz(x => { // multiple lines of logic }) In python, you are forced to move the logic
by dwaltrip 7y ago
Python can't replicate the structure of this JavaScript code:
fooBaz(x => {
// multiple lines of logic
})
In python, you are forced to move the logic away from the point of usage, which means you lose some locality. This loss is sometimes not worth getting a "name" for the logic.
Of course, sometimes it is better to create a named function away from the point of usage, but I don't think that is always the case.