Comments (5)
Thanks for the quick response 👍
from spintax.
When I used literals I did only use raw strings, I only tested the backslashes for a pipe however looking into this I have noticed a different error too.
>>> set([spintax.spin(r"{a\n|b\n|c}") for a in range(1000)])
{'a\\n', 'b\\n', 'c'}
from spintax.
I get the data as human input, hence it is an actual newline character instead of a newline representation (as one would get in raw strings).
To my understanding: r'a\n' == 'a\\n'
is valid?
from spintax.
No you are correct, I am looking into what I should do in this situation the issue arises because \n
is a new line however and the printable characters a\|
is actually represented as a\\|
>>> example_1 = 'a\|b'
>>> example_1
'a\\|b'
>>> print(example_1 )
a\|b
>>> example_2 = 'a\nb'
>>> example_2
'a\nb'
>>> print(example_2)
a
b
I am now looking into doing the selection a different way thanks for bringing this to my attention.
from spintax.
I fixed this issue in commit e65c4ba
from spintax.
Related Issues (7)
- Random seed is never reset HOT 1
- Generate all combinations? HOT 1
- Wrong result HOT 1
- add new operator HOT 1
- python setup.py failed HOT 1
- AttributeError: module 'spintax' has no attribute 'spin' HOT 3
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 spintax.