New submission from steven Michalske <smichal...@gmail.com>:
With the source
```
import cgitb
import sys
try:
f = open('non_exitant_file_path.foo')
except Exception as e:
cgitb.text(sys.exc_info())
```
we get the output
```
Traceback (most recent call last):
File "foo.p
steven Michalske <smichal...@gmail.com> added the comment:
This might be a cython issue then, but I will dig into an example case. Please
be patient.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from steven Michalske <smichal...@gmail.com>:
We are using some compiled cython modules with c++ 11 features.
This prohibits us from instructing users to install python from the python.org
download.
Please consider using clang with support for C++ 11 and higher.
This woul
steven Michalske added the comment:
Argh, I swear I proofread this...
print([a[x] for x in [slice(y+3, y-1, -1) for y in range(0, len(a), 4)]])
[[], [7, 7, 6, 5]]
Catching my explicit case, I changed my code to:
print([a[x] for x in [slice(y+3, y-1 if y > 1 else None, -1) for y in rang
New submission from steven Michalske:
The slicing and using inputed math is is necessary to provide a special case to
make the code behave as expected.
Unless I'm missing something. Like we can't do this, as we loose negative
indexing from the end of the file?
Let's take the following
New submission from steven Michalske:
The asyncio documentation should comment on how to mute and increase some of
it's logging.
18.5.7.3. Logging
The asyncio module logs information with the logging module in the logger
'asyncio'.
Adding a bit of text that mentions the following line would
New submission from steven Michalske:
When writing a regular expression to match the following text.
d = num interesting lines: 3
1
2
3
foo
# I only want to match the interesting lines.
m = re.match(.+?: (\d+)\n((?:.+\n){\1}), d)
print(m)
# prints: None
# Expected a match object.
print
steven Michalske added the comment:
The RE compiler will not error out, with a back reference in there...
It treats the {\1} as a literal {\1} in the string.
In [180]: re.search((\d) fo.{\1}, '3 foo{\1}').group(0)
Out[180]: '3 foo{\x01
New submission from steven Michalske:
When using the @property decorator the wrapped functions are not exposed for
source introspection. (At least I can't see how they are.)
The issue is then that Ipython %psource will show the source for the
@property as opposed to the function that it wraps
steven Michalske smichal...@gmail.com added the comment:
Sorry my request is for output, I am not requesting input. The examples were
for showing the use in other contexts of using an underscore as a word (4 hex
digits) seperaror.
My assertions are from another area aside from computer
steven Michalske smichal...@gmail.com added the comment:
I'll work on a proposal for the ideas list.
Other language examples to keep this in a thread though.
perl -e 'print 0x1234_abcd; print \n;'
C/C++ seems to not support the underscore.
Lua unsupported.
Data sheets from micro controllers
New submission from steven Michalske smichal...@gmail.com:
I started using the .format() on strings and was surprised that it was lacking
an built in format specifier for engineering notation.
For those unfamiliar with engineering notation it puts the exponent of the
number in modulo 3 so
New submission from steven Michalske smichal...@gmail.com:
It is a common practice to separate hex digits with a thousands separator
every 4 hex digits.
0x1234_abcd
Although python does not accept the _ as a thousands separator in hex notation,
neither is the thousands separator in base 10
steven Michalske smichal...@gmail.com added the comment:
Agreed, add is the correct word, I used update because i created a set from
the list that optarg created with append.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
New submission from steven Michalske smichal...@gmail.com:
As a complement to the append action, an update action would update a set with
new values.
update
update a set with this option’s argument
justification:
adding email addresses at the command line, makes it less code to have a unique
15 matches
Mail list logo