We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0701a0b commit 69e3759Copy full SHA for 69e3759
parcels/_compat.py
@@ -19,8 +19,20 @@
19
pass
20
21
22
-# for compat with v3 of parcels. Not sure if there's a better way to do this in v4...
+# for compat with v3 of parcels when users provide `initial=attrgetter("lon")` to a Variable
23
+# so that particle initial state matches another variable
24
class _AttrgetterHelper:
25
+ """
26
+ Example usage
27
+
28
+ >>> _attrgetter_helper = _AttrgetterHelper()
29
+ >>> _attrgetter_helper.some_attribute
30
+ 'some_attribute'
31
+ >>> from operator import attrgetter
32
+ >>> attrgetter('some_attribute')(_attrgetter_helper)
33
34
35
36
def __getattr__(self, name):
37
return name
38
0 commit comments