Skip to content

Commit 9fbec25

Browse files
committed
Sentences start with capital letters
1 parent 88d3df5 commit 9fbec25

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Python to JavaScript / Ruby / C++ / Go / C# / PHP translator
77

88
[Pseudo](https://github.com/alehander42/pseudo) is a framework for high level code generation: it is used by this compiler to translate a subset of Python to all Pseudo-supported languages
99

10-
## supported subset
10+
## Supported subset
1111

1212
Pseudo supports a very clear and somehow limited subset of a language:
1313

@@ -42,28 +42,28 @@ Pseudo supports a very clear and somehow limited subset of a language:
4242
pseudo-python checks if your program is using a valid pseudo-translatable subset of Python, type checks it according to pseudo type rules and generates a `<filename>.pseudo.yaml` output file containing pseudo-ast code
4343

4444
[TODO]
45-
you can directly run `pseudo-python <filename.py> <lang>` e.g.
45+
You can directly run `pseudo-python <filename.py> <lang>` e.g.
4646

4747
```bash
4848
pseudo-python <filename.py> ruby
4949
pseudo-python <filename.py> cpp
5050
```
5151
etc for all the supported pseudo languages (javascript, c++, c#, go, ruby and python)
5252

53-
## error messages
53+
## Error messages
5454

55-
a lot of work has been put into making pseudo-python error messages as clear and helpful as possible: they show the offending snippet of code and
55+
A lot of work has been put into making pseudo-python error messages as clear and helpful as possible: they show the offending snippet of code and
5656
often they offer suggestions, list possible fixes or right/wrong ways to write something
5757

5858
![Screenshot of error messages](http://i.imgur.com/8W7QNgZ.png)
5959

60-
## type inference
60+
## Type inference
6161

62-
the rules are relatively simple: currently pseudo-python infers everything
62+
The rules are relatively simple: currently pseudo-python infers everything
6363
from the usage of functions/classes, so you need to call/initialize all
6464
of your functions/classes (except for no-arg functions)
6565

66-
often you don't really need to do that for **all** of them, you just need
66+
Often you don't really need to do that for **all** of them, you just need
6767
to do it in a way that can create call graphs covering all of them
6868
(e.g. often you'll have `a` calling `b` calling `x` and you only need to
6969
have an `a` invocation in your source)
@@ -92,13 +92,13 @@ Other pseudo-tips:
9292

9393
* Homogeneous tuples are converted to `pseudo` fixed length arrays and heterogeneous to `pseudo` tuples. in the future `pseudo-python` would analyze better `lists`/`tuple` usage to classify them better in `list`/`array`/`tuple` categories (which can optimize the resulting code in `go`/`c++`/`c#`)
9494

95-
* attributes that aren't called from other classes are translated as `private`, the other ones as `public`. The rule for methods is different:
95+
* Attributes that aren't called from other classes are translated as `private`, the other ones as `public`. The rule for methods is different:
9696
`_name` ones are only translated as `private`. That can be added as
9797
config option in the future
9898

99-
* multiple returns values are supported, but they are converted to `array`/`tuple`
99+
* Multiple returns values are supported, but they are converted to `array`/`tuple`
100100

101-
* single inheritance is supported, `pseudo-python` supports polymorphism
101+
* Single inheritance is supported, `pseudo-python` supports polymorphism
102102
but methods in children should accept the same types as their equivalents in the hierarchy (except `__init__`)
103103

104104
The easiest way to play with the type system is to just try several programs: `pseudo-python` errors should be enough to guide you, if not,

example/f.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
class ExError(Exception):
2-
pass
1+
class L:
2+
def __init__(self, a):
3+
self.a = a
34

4-
raise ExError("s")
5+
s = L(2)
6+
e = 'x'
7+
e.k()

tests/test_python.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def translate(self, source):
7676
# 'pseudo_type': 'Void'
7777
# }]
7878
# },
79+
# extensive tests in v0.3/v0.4 when ast spec stabilizes
7980
function = {
8081
t('''
8182
def x(a):

0 commit comments

Comments
 (0)