-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCQueue.py
40 lines (37 loc) · 1.25 KB
/
CQueue.py
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
33
34
35
36
37
38
39
40
# -*- coding: cp1252 -*-
from CNode import *
from CList import *
class CQueue(CList):
def __init__(self):
CList.__init__(self)
def Push(self,data):
if self._CList__size > 0:
CList.Last(self)
CList.Insert(self,data,1)
def Pop(self):
CList.First(self)
data = CList.getData(self)
CList.Remove(self)
return data
def First(self):
raise AttributeError, "¡Función no definida en CQueue!"
def Last(self):
raise AttributeError, "¡Función no definida en CQueue!"
def Right(self):
raise AttributeError, "¡Función no definida en CQueue!"
def Left(self):
raise AttributeError, "¡Función no definida en CQueue!"
def getData(self):
raise AttributeError, "¡Función no definida en CQueue!"
def getLast(self):
raise AttributeError, "¡Función no definida en CQueue!"
def getFirst(self):
raise AttributeError, "¡Función no definida en CQueue!"
def isLast(self):
raise AttributeError, "¡Función no definida en CQueue!"
def isFirst(self):
raise AttributeError, "¡Función no definida en CQueue!"
def Insert(self, data, flag = 1):
raise AttributeError, "¡Función no definida en CQueue!"
def Remove(self):
raise AttributeError, "¡Función no definida en CQueue!"