Changes between Initial Version and Version 1 of Ticket #28866, comment 3
- Timestamp:
- Nov 30, 2017, 7:54:11 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28866, comment 3
initial v1 3 3 I know that static assets must not be duplicated as well as follow predefined order. The easiest way to do it will be like that: 4 4 5 6 {{{ 5 7 for item in list_2: 6 8 if item not in list_1: 7 9 list_1.append(item) 10 }}} 11 8 12 9 13 it will follow all the orders and not duplicate anything. … … 13 17 For throwing the warning (if you really badly need it, guys), we can do that way: 14 18 19 20 {{{ 15 21 order_list = [] 16 22 for item in list_2: … … 21 27 if order_list is not sort(order_list): 22 28 OrderWarning(...) 29 }}} 23 30 24 31 So, 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.