Latest activity

  • A
    The random.randrange(a, b) function, which returns a random number n in the range a <= n < b, and the random.randint(a, b) function...
  • A
    alextretyak replied to the thread F-string support.
    So, I decided to proceed the second way if possible {because it is possible in many cases, including your code}, and proceed the third...
  • D
    Dani replied to the thread My thoughts on UFCS.
    That's rather from the zen of C And that would be an implicit argument. Every decision should be argued at full extent why exactly it is...
  • sebastian
    sebastian replied to the thread F-string support.
    this is old code okay stop bullying me Kidding. But I get it :/
  • A
    alextretyak replied to the thread My thoughts on UFCS.
    "Explicit is better than implicit." ( : The Zen of Python : )
  • D
    Dani replied to the thread My thoughts on UFCS.
    Your statement that every such function definition should be denoted explicitly. That's a very hard question. I'd have to think about...
  • A
    alextretyak replied to the thread My thoughts on UFCS.
    Also parentheses-less methods can replace properties' getters (just like in Ruby): T Value . String val F int_val=(Int new_val)...
  • A
    alextretyak replied to the thread F-string support.
    Also I think that f-strings in this code are slightly overused. For example, f"{brackets[0]}" can be written as str(brackets[0]), or...
  • A
    alextretyak replied to the thread My thoughts on UFCS.
    Can you elaborate on what you mean by this? UFCS feature in itself? Or my statement that this should be denoted explicitly? Or my...
  • A
    alextretyak replied to the thread F-string support.
    As I can see, there are no format specifiers in this code at all. Can you look through all of your code, which you wish to compile with...
  • sebastian
    sebastian replied to the thread F-string support.
    This function uses a lot of f-strings to output a list nicely. Here is the code: def return_exp_list_as_str(obj: list[Exponent], fancy...
  • D
    Dani replied to the thread My thoughts on UFCS.
    What's the reasoning behind this? Also, I'd vote against the version without parentheses, because it's not clear from the code whether...
  • A
    [This post is inspired by this article.] This feature is nice, but I strongly believe that this should be denoted explicitly, i.e. if...
  • A
    alextretyak replied to the thread F-string support.
    Can you bring some examples (maybe links to the source code, if it's open-source)? Currently, Python → 11l transpiler supports Python %...
  • sebastian
    It's a good idea, but I can see a lot of extra hassle trying to get items in & out. I was considering making everything a string, and...
Top