Project

General

Profile

Actions

Feature #3396

closed

Task #3374: Migrate all core modules from legacy Mentat

Task #3376: Polish mentat-inspector.py module

mentat-inspector.py - Implement 'unique' argument for 'tag' and 'set' actions

Added by Jan Mach about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Development - Core
Target version:
Start date:
03/29/2017
Due date:
% Done:

100%

Estimated time:
To be discussed:

Description

It seems that it would be useful to have unique argument for tag and set actions, because they could set the message key only in case it does not already exist within given list.

Actions #1

Updated by Jan Mach about 7 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Jan Mach to Pavel Kácha

This should now be resolved and working on current implementation of filtering grammar. Filtering actions set and tag now have optional argument 'unique', which enables appending values into target list only in case they are unique. Obviously this works only for lists and those lists must be at the end of JPath (uniqueness is checked using Python`s in operator). Uniqueness for any JPath would require prior jpath_values() call, which would slow execution. However this extended behavior is possible, for a price.

Examples can currently be found only in source code of following modules and unit tests:

Actions #2

Updated by Pavel Kácha about 7 years ago

  • Status changed from Resolved to Closed
Actions #3

Updated by Jan Mach over 6 years ago

  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF