Skip to content

[Python] NotImplemented → NotImplementedError #1576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions utils/GYBUnicodeDataUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ class UnicodeProperty(object):
"""Abstract base class for Unicode properties."""

def __init__(self):
raise NotImplemented
raise NotImplementedError(
"UnicodeProperty.__init__ is not implemented.")

def get_default_value(self):
raise NotImplemented
raise NotImplementedError(
"UnicodeProperty.get_default_value is not implemented.")

def get_value(self, cp):
raise NotImplemented
raise NotImplementedError(
"UnicodeProperty.get_value is not implemented.")

def to_numeric_value(self, value):
raise NotImplemented
raise NotImplementedError(
"UnicodeProperty.to_numeric_value is not implemented.")

def get_numeric_value(self, cp):
raise NotImplemented
raise NotImplementedError(
"UnicodeProperty.get_numeric_value is not implemented.")

class GraphemeClusterBreakPropertyTable(UnicodeProperty):
"""Grapheme_Cluster_Break property."""
Expand Down
6 changes: 3 additions & 3 deletions utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,13 @@ class ASTNode(object):
"""Abstract base class for template AST nodes"""

def __init__(self):
raise NotImplemented
raise NotImplementedError("ASTNode.__init__ is not implemented.")

def execute(self, context):
raise NotImplemented
raise NotImplementedError("ASTNode.execute is not implemented.")

def __str__(self, indent=''):
raise NotImplemented
raise NotImplementedError("ASTNode.__str__ is not implemented.")

def format_children(self, indent):
if not self.children:
Expand Down