Python Forum
language feature i'd like to have
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
language feature i'd like to have
#1
ages ago i wrote a macro system for IBM mainframe S/360 S/370 assembler language. one of its features was if you wanted to do a comparison for either an if test or a loop test, you could express the two data sources once, then simply express one data source thereafter and each comparison with one source would insert assembler code as if it were coded with two sources, using the missing source position from the previous comparison. i'd like to see something like that in Python.
    if data_array[data_index[usage_factor[1]]] == '(':
        ...
    elif == ')':
        ...
    elif == '|':
        ...
    else:
        ...
because of the way conditionals were separated from code structures in the system i created in that macro language, this feature could also be used on complex loops. i have heard that Python has some kind of redundancy reduction in comparisons but i have been unable to find it. so maybe this would be useful.
    if data_array[data_index[usage_factor[1]]] == '(' == 'a' or == 'b' or == 'c':
        ...
    else:
        ...
thoughts?

* Skaperen ducks behind the red couch
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
language feature i'd like to have - by Skaperen - Feb-03-2018, 08:15 AM
RE: language feature i'd like to have - by buran - Feb-03-2018, 08:22 AM
RE: language feature i'd like to have - by Larz60+ - Feb-03-2018, 11:10 AM
RE: language feature i'd like to have - by Skaperen - Feb-04-2018, 03:07 AM
RE: language feature i'd like to have - by Skaperen - Feb-05-2018, 06:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is python an interpreted language or a compiled language? GouravDas 1 2,037 Jun-23-2020, 10:38 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020