Changes between Version 3 and Version 5 of Ticket #29639


Ignore:
Timestamp:
05/03/20 15:59:16 (7 months ago)
Author:
egourgoulhon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29639

    • Property Commit changed from 3142781e671de21bf5e242a823fbe8c0a70fb72a to 62dc948cc2fb4309af1cfa4b984e377f31852acb
  • Ticket #29639 – Description

    v3 v5  
    13131/2 d/dx - d/dy
    1414}}}
    15 This is due to `Rational` class having a `__getitem__()` method and  `TensorField._init_components` (introduced in #27581) testing its input by
     15This is due to `Rational` class having a `__getitem__()` method (for some reason...) and  `TensorField._init_components` (introduced in #27581) testing its input by
    1616{{{
    1717    if hasattr(comp0, '__getitem__'):
     
    1919Replacing the above line by
    2020{{{
    21     if isinstance(comp0, (list, tuple)):
     21    if hasattr(comp0, '__len__') and hasattr(comp0, '__getitem__'):
    2222}}}
    23 makes the test more robust and fixes the bug.
     23fixes the bug, since `Rational` has no `__len__` method.