Christopher Welborn added the comment:
You forgot the 'f' to specify that you want float formatting:
```
>>> '{:08.3f}'.format(12.34)
'0012.340'
```
--
nosy: +cjwelborn
___
Python trac
Christopher Welborn added the comment:
I meant to say 'attempting to work on the 3.4 arg clinic version', i can't make
any promises. I'm using it as a learning experience but probably won't yield
any real results any time soon.
--
_
Christopher Welborn added the comment:
Here's the 3.3 version, with the PyThread_allocate_lock comment in the lock
type.
Still working on the 3.4 argument clinic version.
--
Added file:
http://bugs.python.org/file33838/threading.lock.docs.3.3-with-comment.
Changes by Christopher Welborn :
Removed file: http://bugs.python.org/file33819/threading.lock.docs3.3.patch
___
Python tracker
<http://bugs.python.org/issue18
Changes by Christopher Welborn :
Removed file: http://bugs.python.org/file33818/threading.lock.docs.patch
___
Python tracker
<http://bugs.python.org/issue18916>
___
___
Christopher Welborn added the comment:
Yep, I missed the PyThread_allocate_lock reference. As far as the Argument
Clinic Derby, I've been following the python-dev list and reading about
Argument Clinic, but I don't know enough about it to do the conversion. It's a
really good t
Christopher Welborn added the comment:
Hello, my name is Chris Welborn (or Cj). I've been looking for opportunities to
work on python. I figured a little Doc fix would be perfect for my first patch,
as you originally planned. I ran the python unit-tests and `make test`, plus a
'
Christopher Welborn added the comment:
hah, i did. I was working with 'except'ions and accidentally wrote 'except'
instead of 'accept'. rookie mistake, its fixed now. As far as the docs I really
can't say. Antoine would have the answers.
--
Changes by Christopher Welborn :
Removed file:
http://bugs.python.org/file33782/pathlib.readwrite3_with_exclusive.patch
___
Python tracker
<http://bugs.python.org/issue20
Christopher Welborn added the comment:
Using 'review' with pathlib.readwrite4.patch, it looks like it only modifies
one file (test_pathlib.py), which can't be right. Maybe you edited the patch
directly instead of generating a new one? (also, the line-counts haven't
chan
Changes by Christopher Welborn :
--
nosy: -cjwelborn
___
Python tracker
<http://bugs.python.org/issue19620>
___
___
Python-bugs-list mailing list
Unsubscribe:
Christopher Welborn added the comment:
I should've made the patch, sorry about that. I got really busy and by the time
I came back it had been fixed already. (fast turnaround :)
I'm just glad it got fixed. I'm removing myself fro
Changes by Christopher Welborn :
Removed file: http://bugs.python.org/file33642/pathlib.readwrite.patch
___
Python tracker
<http://bugs.python.org/issue20218>
___
___
Christopher Welborn added the comment:
Antoine said:
> I would suggest differently:
> - read_text(encoding, errors, newline)
> - read_bytes()
> - write_text(data, encoding, errors, newline)
> - write_bytes(data)
>
> Strictly speaking, write() could be polymorphic, but I thin
Christopher Welborn added the comment:
I should clarify that last sentence, I was trying to say that the type is
determined by the first item. If the user tries to mix bytes/text they will
receive the proper error from io's writelines when the mismatched type is
written. If the first it
Christopher Welborn added the comment:
Oops, I did. Thanks for that.
So setContent overwrites the file like open('myfile', 'w').write() would,
except it has an option to give the temporary file a different extension (in
case of a crash while writing). That's u
Christopher Welborn added the comment:
Django:
https://docs.djangoproject.com/en/dev/ref/files/file/#django.core.files.File
It looks like Django has a File object that wraps around Python's built-in file
object. It offers a 'mode' attribute, and a read(num_bytes=None) /
Christopher Welborn added the comment:
Ram Rachum:
Have you look at the source for pathlib? f and fd are common names for file
descriptors, especially when using the open() function.
--
___
Python tracker
<http://bugs.python.org/issue20
Christopher Welborn added the comment:
Sorry Antoine, I should've done my homework. I didn't realize 'to whom it may
concern' is actually you. :)
--
___
Python tracker
<http://bug
Christopher Welborn added the comment:
Ram Rachum (and to whom it may concern):
This patch was missing the size argument for readlines(), and it did not match
the overall style of pathlib.py. (using ''' instead of """, and other docstring
style). It also clobb
Christopher Welborn added the comment:
Ram Rachum: If I actually had a say in the matter, I wouldn't be totally
against it. (so far I only lurk the lists/tracker looking for things to work
on.) I was just offering you a solution that you can use _today_.
I do think that if something
Christopher Welborn added the comment:
I was referring to writing helper functions like pathread(mypath),
though the monkeypatch version (p.read()) does work (it did when I tested it).
--
___
Python tracker
<http://bugs.python.org/issue20
Christopher Welborn added the comment:
Isn't this something you could do yourself?
import pathlib
def pathread(self, binary=False):
with self.open('br'if binary else 'r') as fread:
return fread.read()
def pathwrite(self, data, mode='w'):
Christopher Welborn added the comment:
Oops, forgot to mention the documentation I am speaking of is the actual doc
strings. The actual test is to run:
import tokenize
help(tokenize)
or just:
`python -c "import tokenize;help(tokenize)" | gre
New submission from Christopher Welborn:
Documentation for tokenize contains typos, functions detect_encoding() and
tokenize() at least. The lines are:
The tokenize() generator requires one argment, readline,...
It requires one argment, readline,
...where argment is supposed to be 'arg
25 matches
Mail list logo