i feel like it's really ugly but i mean it's simple, it works, it's just not super obvious what it's doing
@mdszy Put it in a function? Then the ugliness is hidden and your code makes more sense upfront.
@OTheB this is in a little expression language without functions, otherwise that's a great idea
@mdszy no functions the fuck?
@OTheB in this context, it's not a fully fledged program where I'm doing this
In the software it's a little input where you can use expressions to do rudimentary operations on strings and numbers, all self contained and very basic, so no functions in this context
Elsewhere the software just uses straight python but yeah
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!