Changes between Initial Version and Version 1 of Ticket #28866, comment 3


Ignore:
Timestamp:
Nov 30, 2017, 7:54:11 AM (7 years ago)
Author:
clincher

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28866, comment 3

    initial v1  
    33I know that static assets must not be duplicated as well as follow predefined order. The easiest way to do it will be like that:
    44
     5
     6{{{
    57for item in list_2:
    68    if item not in list_1:
    79        list_1.append(item)
     10}}}
     11
    812
    913it will follow all the orders and not duplicate anything.
     
    1317For throwing the warning (if you really badly need it, guys), we can do that way:
    1418
     19
     20{{{
    1521order_list = []
    1622for item in list_2:
     
    2127if order_list is not sort(order_list):
    2228    OrderWarning(...)
     29}}}
    2330
    2431So, the idea will be that we can associate order of first and second list and if it is not strictly incremental then throw the warning.
Back to Top