Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

############################################################################## 

# 

# Copyright (c) 2012 Jens Vagelpohl and Contributors. All Rights Reserved. 

# 

# This software is subject to the provisions of the Zope Public License, 

# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. 

# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED 

# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 

# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 

# FOR A PARTICULAR PURPOSE. 

# 

############################################################################## 

 

import six 

 

from dataflake.fakeldap.utils import from_utf8 

 

 

class Op(object): 

""" A simple representation for operators like !, &, | 

 

Operators chain or qualify a set of LDAP search filters 

""" 

 

def __init__(self, op): 

self.op = op 

 

def __repr__(self): 

if six.PY2: 

return "Op('%s')" % self.op 

else: 

return "Op('%s')" % from_utf8(self.op)