Skip to content

Commit

Permalink
Elide slot/classvar conflict in Python 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gjhiggins committed Nov 22, 2012
1 parent fde0ed3 commit b30f590
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rdflib/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
except ImportError:
from md5 import md5

import py3compat
from . import py3compat
b = py3compat.b

class Node(object):
Expand Down Expand Up @@ -392,7 +392,10 @@ class Literal(Identifier):
"""
__doc__ = py3compat.format_doctest_out(doc)

__slots__ = ("language", "datatype", "_language", "_datatype", "_cmp_value")
if not py3compat.PY3:
__slots__ = ("language", "datatype", "_language", "_datatype", "_cmp_value")
else:
__slots__ = ("_language", "_datatype", "_cmp_value")

def __new__(cls, value, lang=None, datatype=None):
if lang is not None and datatype is not None:
Expand Down

0 comments on commit b30f590

Please sign in to comment.