From e6fa716da29e2947d5123f09887238e6843013a2 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Fri, 5 Aug 2016 11:24:19 -0400 Subject: [PATCH 1/2] add __or__ to lazyobject --- xonsh/lazyasd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xonsh/lazyasd.py b/xonsh/lazyasd.py index 33b2e1740..6f0849e45 100644 --- a/xonsh/lazyasd.py +++ b/xonsh/lazyasd.py @@ -112,6 +112,10 @@ class LazyObject(object): obj = self._lazy_obj() return hash(obj) + def __or__(self, other): + obj = self._lazy_obj() + return obj | other + def lazyobject(f): """Decorator for constructing lazy objects from a function.""" From 1524a78a93053bb76c9c8fb814bc68a80fc91f8b Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Fri, 5 Aug 2016 11:27:24 -0400 Subject: [PATCH 2/2] add news entry --- news/lazy_union.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 news/lazy_union.rst diff --git a/news/lazy_union.rst b/news/lazy_union.rst new file mode 100644 index 000000000..4e28402a2 --- /dev/null +++ b/news/lazy_union.rst @@ -0,0 +1,13 @@ +**Added:** None + +**Changed:** None + +**Deprecated:** None + +**Removed:** None + +**Fixed:** + +* LazyObject supports set union + +**Security:** None