Comments (5)
2041f71 introduces conversion of single-line MATLAB
comments to their python
counterparts, by replacing %
by #
. Conversion of multi-line comments remains.
from smop.
Additional features to be implemented:
- multi-line comments
- function help text translation to docstring
from smop.
I think I integrated your code, thanks.
Please run the new code on fastsolver.m and fix the regressions.
python fastsolver.m
python a.py
*** error messages here ***
On Mon, Nov 25, 2013 at 12:18 PM, Ioannis Filippidis <
[email protected]> wrote:
Additional features to be implemented:
- multi-line comments
- function help text translation to docstring
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-29190204
.
Calligraphy of geese / Against the sky / The moon seals it /
(Buson/Hass)
from smop.
Yes, the changes have been integrated, thank you.
The problem was with the commented line
if curscore2<curscore
moves=moves22;
else
% [moves1,yess]=dealWall1(A,B,w0,moves);
end;
in fastsolver.m
. The result after translation with comments enabled was:
else:
# [moves1,yess]=dealWall1(A,B,w0,moves);
#etc
This caused an indentation error, because it requires that either a pass
statement be inserted, or the comment deleted.
Enabling comments intends to keep all comments, so deleting the comment is not the behavior expected by the user.
So the preferred solution appears to be to detect this specific case and insert a pass
statement.
1bc6c3a implements this.
Note that in general the same issue can occur also with while
and for
statements. These cases remain open. If the patch is agreed to be the appropriate fix, then I can extend it to cover these cases as well.
from smop.
@victorlei
Above some changes to support comments are linked. They are surprisingly not in the current master branch. Is this intended or by mistake?
from smop.
Related Issues (20)
- 'DiGraph' object has no attribute 'node' HOT 15
- The function call to 'arange' function in converted .py file is incorrect
- Future Warning: Possible nested set at... creates tons of "str" output HOT 6
- No output and no file created HOT 5
- Lexer crash on `...>=(...)...` HOT 1
- FutureWarning: Possible nested set at...
- Python 2 print statement in test_primes.py HOT 1
- issue working HOT 1
- NEED HELP !! nothing created for running the main HOT 1
- New Matlab Lexer & Parser HOT 5
- Maintenance? HOT 2
- iscell is not defined
- Does'nt run with Python 3.9.5 cannot import name 'gcd' from 'fractions' HOT 1
- New similar project [mat2py](https://mat2py.org/)
- TypeError: '<' not supported between instances of 'NoneType' and 'NoneType' HOT 1
- ImportError on windows HOT 3
- smop command not found even after installation HOT 1
- Where does .py go to? HOT 1
- Doesn't work: python main.py fastsolver.m AND smop fastsolver.m HOT 3
- Observations about SMOP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smop.