Juan Jimenez added the comment:
Pull request https://github.com/python/cpython/pull/21693 created for the demo
steven.daprano suggested.
--
message_count: 8.0 -> 9.0
pull_requests: +20836
pull_request: https://github.com/python/cpython/pull/21
Change by Juan Jimenez :
--
keywords: +patch
pull_requests: +20835
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21693
___
Python tracker
<https://bugs.python.org/issu
New submission from Juan Jimenez :
As per a suggestion in https://bugs.python.org/issue41274 I would like to
submit for consideration a new demo program, one that demonstrates how to use a
web API to generate a pseudo-random generator seed from high resolution, high
cadence images of the sun
Juan Jimenez added the comment:
How would I know if my demo is good enough to be included in that repo? Is
there a guide for this, or do I just create a pull request, throw it over the
fence and wait until the wolves either grunt in approval or throw it back at me
in pieces? I ask because I
Juan Jimenez added the comment:
Thanks Rémi. :)
--
___
Python tracker
<https://bugs.python.org/issue41274>
___
___
Python-bugs-list mailing list
Unsubscribe:
Juan Jimenez added the comment:
I'm not a Python guru, but I was wondering, is it possible to write a new
module that overrides the seed() method in the random library in its
initialization code and replaces it with this method of seeding the generator
New submission from Juan Jimenez :
I have invented a new way to seed the random number generator with about as
random a source of seeds as can be found: hashes generated from high cadence,
high resolution images of the surface of the Sun. These are captured by the
Solar Dynamics
Juan Arrivillaga added the comment:
But when would you want to have a descriptor as an instance attribute?
Descriptors must be in the class dictionary to work:
https://docs.python.org/3/reference/datamodel.html#implementing-descriptors
I suppose, you could want some container class
Juan Arrivillaga added the comment:
Actually, couldn't the following be a workaround, just set the property on the
class after the class definition:
import dataclasses
import typing
@dataclasses.dataclass
class FileObject:
uploaded_by:typing.Optional[None]=None
def
Juan Arrivillaga added the comment:
So, after glancing at the source code:
https://github.com/python/cpython/blob/ce54519aa09772f4173b8c17410ed77e403f3ebf/Lib/dataclasses.py#L869
During this processing of fields, couldn't you just special case
property/descriptor objects?
--
nosy
Juan Telleria added the comment:
And based on previous example, a more "pythonic" syntax would:
MyObj = Class \
.method1() \
.f_function1() \
.method2() \
.f_function2(param1 = "A", param2 = .)
So that any function preceded by a dot "." becomes a
Juan Telleria added the comment:
Even if it is not currently mainstream, piping (tidy and readable code, left to
right), should be a foundation, not just a module.
--
___
Python tracker
<https://bugs.python.org/issue38
Juan Telleria added the comment:
There was a positive response from package mantainers for this issue :)
See: https://github.com/sspipe/sspipe/issues/4
>> is the module mature and stable?
I am using this module in my own projects for a while and it satisfies my own
requirements. Howe
Change by Juan Telleria :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue38052>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Juan Telleria :
Could sspipe be included as a Core Python module?
https://sspipe.github.io/
https://github.com/sspipe/sspipe
https://pypi.org/project/sspipe/
sspipe allows to use syntax such as:
from sspipe import p, px
import numpy as np
import pandas as pd
New submission from Juan :
The below sections in modules documentation have wrong information about fibo
module:
6. Modules
6.1. More on Modules
6.1.1. Executing modules as scripts
6.3. The dir() Function
The name of module is Fibo not fibo and the attributes are fab,fab2 not
fib,fib2
Juan Postlbauer <jpc4...@gmail.com> added the comment:
Just a clarification: by "infinite potential loop" I meant a loop that
*theoretically* could last forever. Of course in practice it won't, but my
experiments show that for the conditions in the example in average the
New submission from Juan Enrique Segebre Zaghmout <juansege...@gmail.com>:
The following code generates False when it should generate true:
True == False < 20
Either way the order of operation is taken should result in True but the answer
still results in False. To further confirm t
New submission from Juan Postlbauer <jpc4...@gmail.com>:
Chapter 15.3.4 shows a recipe with an infinite potential loop.
An alternative would be:
''.join(sorted([choice(string.ascii_lowercase) for i in
range(1)]+[choice(string.ascii_uppercase) for i in
range(1)]+[choice(string.digits)
Juan added the comment:
I am using Windows 10 64-bit.
>> sometimes whatever you pressed in step 3 disappears,
>
> When Shell is restarted by whatever means, any pending input, whether in
> response to '>>>' or user input(), is cancelled and
> *should* disapp
Juan added the comment:
*doesn't respond to commands. I mean something similar to (not equal)
"while(1): pass")
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.py
Juan added the comment:
What I meant was:
1. Open a file whose content is "input()" with IDLE
2. F5
3. Type something but without pressing Enter.
4. Come back to the script (with input() still responding to keystrokes on the
input line)
5. F5
6. Bug. (Results vary even on the sa
New submission from Juan:
This bug can be recreated by opening a file whose content is "input()" with
IDLE, press F5 and the shell opens as expected. Without making the input in the
shell stop, press F5 in the script again. In Python 3.5 IDLE only take input
until another F5 (
New submission from Juan Carlos Pujol Mainegra:
Let s be a string or other array-like object, a, b > 0 integers, s[0:b] returns
a b-long prefix to s, the same as s[:b], but s[-a:0] returns empty (for len(s)
> 0 and a > 1), while it should return the same as s[-a:], an a-long suffi
New submission from Juan Jimenez-Anca:
When trying to assign the metavar in add_argument() method of argparse module
I'm unable to include characters after a right square bracket.
Trying to set something like this:
metavar="[host:database:collection:]field"
would raise an Asse
Juan Jimenez-Anca added the comment:
My apologies for the formatting of the last line. This is my issue corrected:
When trying to assign the metavar in add_argument() method of argparse module
I'm unable to include characters after a right square bracket.
Trying to set something like
Juan Javier added the comment:
David, I think this doesn't deserve to be part of the library since it is
trivial to write and it is just a particular use case.
Adding it as an example in the threading module's documentation might be a good
idea, what do you think
Juan Javier added the comment:
Hi Brian,
No, no progress on this. I think this is not an interesting feature after all.
You can close this.
Juan Javier
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13785
Juan Javier added the comment:
It looks like this is not very interesting after all.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
Changes by Juan Javier jjdomingu...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13785
___
___
Python-bugs
Juan Luis Boya García added the comment:
Sorry for the late response, GMail's SPAM filter ate the replies.
The main issue is sys.stdout being opened as text instead of binary. This fact
is stated in the docs. http://docs.python.org/3/library/sys.html#sys.stdout
In any case, there are some
Juan Benavente Ponce added the comment:
set.intersection and frozenset.intersection docstrings are back to the wrong
two-sets-only version in Python 3.3 (Python 2.7 is not affected):
intersection(...)
Return the intersection of two sets as a new set.
(i.e. all elements
Juan Benavente Ponce added the comment:
Comparing the docstrings with the on-line documentation, I have found that, in
addition to the already mentioned issue, the fact that many methods only
require the first argument to be a set (or frozenset) object is not mentioned
anywhere
Juan Javier added the comment:
Ok, you are right, serialized is the right name. Also, passing the lock to the
decorator will the correct option.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
Juan Javier added the comment:
What about this?
def serialized(lock):
def _serialized(func):
def __serialized(*args, **kwds):
with lock:
return func(*args, **kwds)
__serialized.__doc__ = func.__doc__
return __serialized
return
New submission from Juan Javier:
I think it will be useful to have a decorator like this one on the threading
module:
def synchronized(func):
A decorator to make a function execution synchronized.
Examples:
@synchronized
def foo():
pass
class Foo:
def
Changes by Juan Javier jjdomingu...@gmail.com:
--
status: open - languishing
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13785
___
___
Python
Juan Javier jjdomingu...@gmail.com added the comment:
I totally agree, I'm going to take a look at the code and I'll write back with
some comments. That will be next week, work is currently very demanding.
--
status: languishing - open
versions: +Python 3.4 -Python 3.3
Juan Javier jjdomingu...@gmail.com added the comment:
I'm writting an application where users can submit long running jobs and I want
to disply a list of those jobs and the state of each one.
My idea is to use an executor and use the futures to display information about
the jobs: not started
Juan Javier jjdomingu...@gmail.com added the comment:
The use case is to know the state of a future without having to do something
like this
@property
def state(self):
if self.future.running():
return Process.States.Running
elif self.future.cancelled
Juan Javier jjdomingu...@gmail.com added the comment:
Hello,
You're right, explaining the difference between CANCELLED and
CANCELLED_AND_NOTIFIED is gong to be hard and might be confusing. I also agree
that there is no precedent for storing the history of something, and I don't
like either
New submission from Juan Javier jjdomingu...@gmail.com:
Hello,
This is a proposal to make the state of Future objects public.
The idea is to have access to the current state of the Future using a property
instead of calling several methods (done, cancelled, etc.).
Also, a history property
Juan Gonzalez juan.gonza...@ti.com added the comment:
Today I tried to use parse() instead of find() and I found out the following
response:
tony@ubuntu:~/auto/sel/scripts$ python wtfibmdom
Traceback (most recent call last):
File wtfibmdom, line 22, in module
if url.parse(str) 0
Juan Gonzalez juan.gonza...@ti.com added the comment:
Hi Georg,
This is the python code listing:
from RSS import ns, CollectionChannel, TrackingChannel
#Create a tracking channel, which is a data structure that
#Indexes RSS data by item URL
tc = TrackingChannel()
str = 'j3-nspire-prd
Juan Gonzalez juan.gonza...@ti.com added the comment:
I print 1 before the faulty line and like Jesús says I'm surprised I get a 1
Description: Build passed
1
Traceback (most recent call last):
File wtfibmdom, line 23, in module
if url.find(str) 0:
AttributeError: 'int' object has
New submission from Juan Gonzalez juan.gonza...@ti.com:
Something really weird going on in python find() string function. When I call
string.find() and python returns -1 it crashes when compared against 0 using
the operator.
The statement in which crash condition occurs is the following
New submission from Juan José Conti jjco...@gmail.com:
I expected I could iterate over a DictProxy as I do over a regular dict.
from multiprocessing import Manager
m = Manager()
d = m.dict()
d
DictProxy object, typeid 'dict' at 0x98a240c
for x in d:
... print x
...
Traceback (most
Juan Javier jjdomingu...@gmail.com added the comment:
I would like the method to have the exact same behavior as before if the
default argument is not present, and return the given default value when
deafult argument is present.
If you simply add a default keyword, it will always be present
Juan Javier jjdomingu...@gmail.com added the comment:
I've applied the enhancement to the three parsers, actually I've made the
change to RawconfigParser with a small change to ConfigParser.
I've also created some unit tests.
--
keywords: +patch
Added file: http://bugs.python.org
Changes by Juan Javier jjdomingu...@gmail.com:
Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6751
Juan José Conti jjco...@gmail.com added the comment:
Yeah... I did't like that docstring either :) Removed!
Also fixed Decimal.copy_sign, changed Context.copy_sign and added tests.
--
Added file: http://bugs.python.org/file16052/issue7633_jjconti4.patch
Juan José Conti jjco...@gmail.com added the comment:
1) Agree. Extra checks removed.
2) My mistake. Fixed.
3) Fexed.
4) Methods documentation fixed. Also added examples.
5) Fixed
6) Allow ints in the following unary methods (all except the ones excluded by
skrah in cdecimal):
- abs
- canonical
Juan José Conti jjco...@gmail.com added the comment:
I've been working in the modified version of my last patch to solve the 6
mentioned points. I'm posting it in less than 24 hs.
If you're not hurry, please wait for me. This is just my second patch and is
very useful to learn how
Changes by Juan José Conti jjco...@gmail.com:
--
nosy: +jjconti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7652
___
___
Python-bugs-list
Juan José Conti jjco...@gmail.com added the comment:
New patch.
Fix Context.method that were returning NotImplemented.
Decimal.__methods__ don't use raiseit=True in _convert_other so I check in
Context.method and raise TypeError if necessary.
Added tests for Context.divmod missed in first
Juan José Conti jjco...@gnu.org added the comment:
The same happens with other Context methods, like divide:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
from decimal import *
c = getcontext
Juan José Conti jjco...@gmail.com added the comment:
I've been reading http://speleotrove.com/decimal and seems not to be an
explicit definition about this. I'm thinking in a patch I could supply tomorrow.
What about the idea of changing the implementation from:
return a.__add__(b
Juan José Conti jjco...@gmail.com added the comment:
The attached patch solves this issue.
Finally, only operand 'a' needs to be converted to Decimal if it's not. I
discover this after writing my tests and start the implementation.
A Context.method is modified if it has more than one operand
New submission from Juan Javier jjdomingu...@yahoo.com:
I think it is useful, at least for me, to add an argument, default, to
[Safe,Raw]ConfigParser.get that, if present, will be returned if the
methid fails to return the value.
That is, instead of rasing an exception, return default
New submission from Juan Javier [EMAIL PROTECTED]:
I get the following exception:
$ /opt/python3.0b2/bin/python3.0 -m trace -c -m run.py
Traceback (most recent call last):
File /opt/python3.0b2/lib/python3.0/runpy.py, line 121, in
_run_module_as_main
__main__, fname, loader, pkg_name
Juan José Conti added the comment:
This is my first patch.
Bug fix on revision 60076.
--
nosy: +jjconti
Added file: http://bugs.python.org/file9220/bug_fix_for_1779.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1779
Juan José Conti added the comment:
The same patch as before plus tests.
Added file: http://bugs.python.org/file9228/bug_fix_for_1779-plustests.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1779
Juan Manuel Borges Caño added the comment:
Thank you for the link.
I think this bug is already closed.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720992
63 matches
Mail list logo