This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 61a0b606 authored by Gintautas Miliauskas's avatar Gintautas Miliauskas
Browse files

Removed trailing whitespace, fixed typos, wrapped long lines.

parent 450016707a4e
......@@ -305,7 +305,7 @@ class __extend__(SomeString):
getbookkeeper().count("str_join", str)
s_item = s_list.listdef.read_item()
if s_item == SomeImpossibleValue():
return immutablevalue("")
return immutablevalue("")
return SomeString()
def iter(str):
......@@ -330,7 +330,7 @@ class __extend__(SomeChar):
def len(chr):
return immutablevalue(1)
def method_isspace(chr):
def method_isspace(chr):
return SomeBool()
class __extend__(SomeUnicodeCodePoint):
......
......@@ -351,7 +351,7 @@ interpreter and standard object space into a lower-level language. In
order for our translation and type inference mechanisms to work
effectively, we need to restrict the dynamism of our interpreter-level
Python code at some point. However, in the start-up phase, we are
completly free to use all kind of nice python constructs, including
completely free to use all kind of nice python constructs, including
metaclasses and execution of dynamically constructed strings. However,
when the initialization phase (mainly, the function
``objspace.initialize()``) finishes, all code objects involved need to
......@@ -367,7 +367,7 @@ graph are basic blocks consisting of Object Space operations, flowing
of values, and an exitswitch to one, two or multiple links which connect
each basic block to other basic blocks.
The flow graphs are fed as input into the Annotator. The Annotator,
The flow graphs are fed as input into the Annotator. The Annotator,
given entry point types, infers the types of values that flow through
the program variables. Here, the definition of `RPython`_ comes
again into play: RPython code is restricted in such a way that the
......@@ -383,7 +383,7 @@ pretty stable now, and able to process the whole of PyPy, the RPython
definition will probably continue to shift marginally as we improve it.
The actual low-level code (and, in fact, also other high-level code) is
emitted by "visiting" the type-annotated flow graph. Currently, we have
emitted by "visiting" the type-annotated flow graph. Currently we have
a C-producing backend, and an LLVM-producing backend. The former also
accepts non-annotated or partially-annotated graphs, which allow us to
test it on a larger class of programs than what the Annotator can (or
......
This diff is collapsed.
Contributors to PyPy
====================
Contributors to PyPy
====================
Here is a list of developers who have committed to the PyPy source
code base, ordered by number of commits (which is certainly not a very
appropriate measure but it's something)::
Here is a list of developers who have committed to the PyPy source
code base, ordered by number of commits (which is certainly not a very
appropriate measure but it's something)::
Armin Rigo
Samuele Pedroni
......
Frequently Asked Questions
==========================
Frequently Asked Questions
==========================
How fast is PyPy?
How fast is PyPy?
As of June 2005, PyPy still runs on top of CPython and thus
is slower by a factor of 2000 compared to CPython. We don't
is slower by a factor of 2000 compared to CPython. We don't
know yet how fast it will be once we complete our translation
efforts, aimed at a first static self-contained low-level
translated version.
efforts, aimed at a first static self-contained low-level
translated version.
Installing subversion for PyPy
==============================
Installing subversion for PyPy
==============================
Jens-Uwe Mager has prepared some installation files which should
help you to install subversion on your computer.
Jens-Uwe Mager has prepared some installation files which should
help you to install subversion on your computer.
+ Download Unix source tarball or prepackaged versions_ for MacOS, Windows, FreeBSD and Linux
......@@ -12,7 +12,7 @@ help you to install subversion on your computer.
* See Microsoft website_ if you have .DLL issues.
* Windows Installer file for Tortoise SVN (like Tortoise CVS) GUI_
(Pick the UNICODE version for Windows 2000 and XP and
(Pick the UNICODE version for Windows 2000 and XP and
see Win_ 2000, NT if you have problems loading it.)
+ Local copy of MacOS_ X binary tar ball
......@@ -28,7 +28,7 @@ For complete information, you can go read the subversion guide_.
**Download and install the appropriate installation file of subversion above.**
For linux:
For linux:
download the tarball. unzip and untar it. Then type *./configure*. Then, as root, *make* followed by *make install*. Voilà ... a subversion client.
......@@ -87,7 +87,7 @@ or::
Transmitting file data .
Committed revision 631.
Check online on the `svn-commit archives`_ and you'll see your revision. Feel free to add a documentation file on any major changes you've made!
Check online on the `svn-commit archives`_ and you'll see your revision. Feel free to add a documentation file on any major changes you've made!
.. _`svn-commit archives`: http://codespeak.net/pipermail/pypy-svn/
......@@ -158,4 +158,4 @@ and add a line for .py files.
.. _guide: http://svnbook.red-bean.com/book.html#svn-ch-1
.. _backports: http://www.backports.org
.. _online: http://codespeak.net/svn/pypy/dist/
.. _coding-guide: coding-guide.html
.. _coding-guide: coding-guide.html
This diff is collapsed.
......@@ -16,7 +16,7 @@ class Function(Wrappable):
"""A function is a code object captured with some environment:
an object space, a dictionary of globals, default arguments,
and an arbitrary 'closure' passed to the code object."""
def __init__(self, space, code, w_globals=None, defs_w=[], closure=None, forcename=None):
self.space = space
self.name = forcename or code.co_name
......@@ -76,7 +76,7 @@ class Function(Wrappable):
if not isinstance(code, PyCode) or len(code.co_freevars) == 0:
raise OperationError(space.w_ValueError, space.wrap("no closure needed"))
elif len(code.co_freevars) != n:
raise OperationError(space.w_ValueError, space.wrap("closure is wrong size"))
raise OperationError(space.w_ValueError, space.wrap("closure is wrong size"))
closure = []
for w_cell in closure_w:
cell = space.interpclass_w(w_cell)
......@@ -98,7 +98,7 @@ class Function(Wrappable):
if not values_w:
return space.w_None
return space.newtuple(values_w)
def fset_func_defaults(space, self, w_defaults):
if not space.is_true( space.isinstance( w_defaults, space.w_tuple ) ):
raise OperationError( space.w_TypeError, space.wrap("func_defaults must be set to a tuple object") )
......@@ -125,10 +125,10 @@ class Function(Wrappable):
else:
self.w_module = space.w_None
return self.w_module
def fset___module__(space, self, w_module):
self.w_module = w_module
def fdel___module__(space, self):
self.w_module = space.w_None
......@@ -140,7 +140,7 @@ class Function(Wrappable):
if not isinstance(code, Code ):
raise OperationError( space.w_TypeError, space.wrap("func_code must be set to a code object") )
self.code = code
def fget_func_closure(space, self):
if self.closure is not None:
w_res = space.newtuple( [ space.wrap(i) for i in self.closure ] )
......@@ -171,7 +171,7 @@ def _getclass(space, w_obj):
return space.type(w_obj)
raise
class Method(Wrappable):
class Method(Wrappable):
"""A method is a function bound to a specific instance or class."""
def __init__(self, space, w_function, w_instance, w_class):
......@@ -179,7 +179,7 @@ class Method(Wrappable):
self.w_function = w_function
self.w_instance = w_instance # or None
self.w_class = w_class # possibly space.w_None
def descr_method__new__(space, w_subtype, w_function, w_instance, w_class=None):
if space.is_w( w_instance, space.w_None ):
w_instance = None
......@@ -218,7 +218,7 @@ class Method(Wrappable):
instname += " "
instdescr = "%sinstance" %instname
msg = ("unbound method %s() must be called with %s"
"instance as first argument (got %s instead)") % (myname, clsdescr, instdescr)
"instance as first argument (got %s instead)") % (myname, clsdescr, instdescr)
raise OperationError(space.w_TypeError,
space.wrap(msg))
return space.call_args(self.w_function, args)
......@@ -241,17 +241,17 @@ class Method(Wrappable):
def descr_method_call(self, __args__):
return self.call_args(__args__)
def descr_method_repr(self):
def descr_method_repr(self):
space = self.space
name = self.w_function.getname(self.space, '?')
# XXX do we handle all cases sanely here?
if space.is_w(self.w_class, space.w_None):
w_class = space.type(self.w_instance)
else:
w_class = self.w_class
# XXX do we handle all cases sanely here?
if space.is_w(self.w_class, space.w_None):
w_class = space.type(self.w_instance)
else:
w_class = self.w_class
typename = w_class.getname(self.space, '?')
if self.w_instance is None:
s = "<method '%s' of '%s' objects>" %(name, typename)
if self.w_instance is None:
s = "<method '%s' of '%s' objects>" %(name, typename)
return space.wrap(s)
else:
info = "method %s of %s object" % (name, typename)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment