Re: [ python-Bugs-1215887 ] String and list methods deeply hidden

2005-12-24 Thread Chuck Rhode
SourceForge.net wrote this on Mon, Jun 06, 2005 at 11:16:19AM -0700.  My reply 
is below.

The way the docs are written makes perfect sense to me ~ now ~ but I
too had difficulty navigating them at first, particularly with finding
the methods of sequence types from the TOC.  Eventually, I must have
looked them up in the alphabetic index and backtracked to find the
appropriate TOC headings.  Isn't that what everyone does?

I think that's what everyone should do!

Not being a "C" programmer, I must refer to "2.3.6.2 String Formatting
Operations" continually, and I'm not complaining that it's not buried
under "2.3.6.1 String Methods."  

Exposing the fourth level of subtopics in section 2.3 of the lib.html
document would be nice, though.

-- 
.. Chuck Rhode, Sheboygan, WI
.. http://www.excel.net/~crhode/RockyGnashtoothsWeather/
.. 72?F. Wind WSW 9 mph. Partly cloudy. 
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



errors when trying to send mail

2005-12-24 Thread RK

I've seen another bug submission similar to this.  I am using 2.3.4 and 
I get almost the exact same error.  I'm on a linux box (2.6.9-5.ELsmp) 
and the same code runs fine on other machines and previous versions of 
python - here's the code snippet:

msg = MIMEMultipart()
COMMASPACE = ', '
msg['Subject'] = 'NO Build (' + tstr + ')'
msg['From'] = '[EMAIL PROTECTED]'
msg['To'] = COMMASPACE.join(buildmgrs)
msg['To'] = buildlead
msg.preamble = 'Build Results'
msg.epilogue = ''

mailsrv = smtplib.SMTP('server')
mailsrv.sendmail(buildlead, buildlead, msg.as_string())
time.sleep(5)
mailsrv.close()


Here's the error:

Traceback (most recent call last):
   File "./testMail.py", line 60, in ?
 mailsrv.sendmail(buildlead, buildlead, msg.as_string(unixfrom=True))
   File "/usr/lib64/python2.3/email/Message.py", line 130, in as_string
 g.flatten(self, unixfrom=unixfrom)
   File "/usr/lib64/python2.3/email/Generator.py", line 102, in flatten
 self._write(msg)
   File "/usr/lib64/python2.3/email/Generator.py", line 137, in _write
 self._write_headers(msg)
   File "/usr/lib64/python2.3/email/Generator.py", line 183, in 
_write_headers
 header_name=h, continuation_ws='\t').encode()
   File "/usr/lib64/python2.3/email/Header.py", line 415, in encode
 return self._encode_chunks(newchunks, maxlinelen)
   File "/usr/lib64/python2.3/email/Header.py", line 375, in _encode_chunks
 _max_append(chunks, s, maxlinelen, extra)
   File "/usr/lib64/python2.3/email/quopriMIME.py", line 84, in _max_append
 L.append(s.lstrip())
AttributeError: 'list' object has no attribute 'lstrip'


Thanks

___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



errors while trying to send email

2005-12-24 Thread Ronald Kijewski

I've seen another bug submission similar to this.  I am using 2.3.4 and I get 
almost the exact same error.  I'm on a linux box (2.6.9-5.ELsmp) and the same 
code runs fine on other machines and previous versions of python - here's the 
code snippet:

msg = MIMEMultipart()
COMMASPACE = ', '
msg['Subject'] = 'NO Build (' + tstr + ')'
msg['From'] = '[EMAIL PROTECTED]'
msg['To'] = COMMASPACE.join(buildmgrs)
msg['To'] = buildlead
msg.preamble = 'Build Results'
msg.epilogue = ''

mailsrv = smtplib.SMTP('server')
mailsrv.sendmail(buildlead, buildlead, msg.as_string())
time.sleep(5)
mailsrv.close()


Here's the error:

Traceback (most recent call last):
  File "./testMail.py", line 60, in ?
mailsrv.sendmail(buildlead, buildlead, msg.as_string(unixfrom=True))
  File "/usr/lib64/python2.3/email/Message.py", line 130, in as_string
g.flatten(self, unixfrom=unixfrom)
  File "/usr/lib64/python2.3/email/Generator.py", line 102, in flatten
self._write(msg)
  File "/usr/lib64/python2.3/email/Generator.py", line 137, in _write
self._write_headers(msg)
  File "/usr/lib64/python2.3/email/Generator.py", line 183, in _write_headers
header_name=h, continuation_ws='\t').encode()
  File "/usr/lib64/python2.3/email/Header.py", line 415, in encode
return self._encode_chunks(newchunks, maxlinelen)
  File "/usr/lib64/python2.3/email/Header.py", line 375, in _encode_chunks
_max_append(chunks, s, maxlinelen, extra)
  File "/usr/lib64/python2.3/email/quopriMIME.py", line 84, in _max_append
L.append(s.lstrip())
AttributeError: 'list' object has no attribute 'lstrip'


Thanks


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1388949 ] Decimal sqrt() ignores rounding

2005-12-24 Thread SourceForge.net
Bugs item #1388949, was opened at 2005-12-23 12:11
Message generated for change (Settings changed) made by facundobatista
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1388949&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Adam Olsen (rhamphoryncus)
>Assigned to: Facundo Batista (facundobatista)
Summary: Decimal sqrt() ignores rounding

Initial Comment:
Decimal Contexts' sqrt() method exhibits the same
rounding behavior irregardless of the rounding parameter.

>>> c = decimal.Context(rounding=decimal.ROUND_CEILING)
>>> f = decimal.Context(rounding=decimal.ROUND_FLOOR)
>>> cs =
decimal.Context(rounding=decimal.ROUND_CEILING, prec=14)
>>> fs = decimal.Context(rounding=decimal.ROUND_FLOOR,
prec=14)
>>> c.sqrt(D(2))
Decimal("1.414213562373095048801688724")
>>> f.sqrt(D(2))
Decimal("1.414213562373095048801688724")
>>> cs.sqrt(D(2))
Decimal("1.4142135623731")
>>> fs.sqrt(D(2))
Decimal("1.4142135623731")

It appears to always round up.


Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
Debian unstable

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1388949&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1388949 ] Decimal sqrt() ignores rounding

2005-12-24 Thread SourceForge.net
Bugs item #1388949, was opened at 2005-12-23 12:11
Message generated for change (Comment added) made by facundobatista
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1388949&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Adam Olsen (rhamphoryncus)
Assigned to: Facundo Batista (facundobatista)
Summary: Decimal sqrt() ignores rounding

Initial Comment:
Decimal Contexts' sqrt() method exhibits the same
rounding behavior irregardless of the rounding parameter.

>>> c = decimal.Context(rounding=decimal.ROUND_CEILING)
>>> f = decimal.Context(rounding=decimal.ROUND_FLOOR)
>>> cs =
decimal.Context(rounding=decimal.ROUND_CEILING, prec=14)
>>> fs = decimal.Context(rounding=decimal.ROUND_FLOOR,
prec=14)
>>> c.sqrt(D(2))
Decimal("1.414213562373095048801688724")
>>> f.sqrt(D(2))
Decimal("1.414213562373095048801688724")
>>> cs.sqrt(D(2))
Decimal("1.4142135623731")
>>> fs.sqrt(D(2))
Decimal("1.4142135623731")

It appears to always round up.


Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
Debian unstable

--

>Comment By: Facundo Batista (facundobatista)
Date: 2005-12-24 14:46

Message:
Logged In: YES 
user_id=752496

The rounding setting in the context is not used, always uses
the round-half-even algorithm, as specified in the Decimal
Specification (see
http://www2.hursley.ibm.com/decimal/daops.html#refsqrt).

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1388949&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1389673 ] Incorrectly docs for return values of set update methods

2005-12-24 Thread SourceForge.net
Bugs item #1389673, was opened at 2005-12-24 13:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389673&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrectly docs for return values of set update methods

Initial Comment:
The documentation for set.update(),
set.intersection_update(), set.difference_update() and
set.symmetric_difference_update currently (as of
r41806) states that these methods all return the
updated set, implying that this is a not-in-place
change. In fact, these methods do operate in place,
each one of them returning None.

The attached diff (against Doc/lib/libstdtypes.tex,
r41806) fixes this, making it clear that these are
in-place operations.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389673&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1389673 ] Incorrect docs for return values of set update methods

2005-12-24 Thread SourceForge.net
Bugs item #1389673, was opened at 2005-12-24 13:27
Message generated for change (Settings changed) made by collinwinter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389673&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Incorrect docs for return values of set update methods

Initial Comment:
The documentation for set.update(),
set.intersection_update(), set.difference_update() and
set.symmetric_difference_update currently (as of
r41806) states that these methods all return the
updated set, implying that this is a not-in-place
change. In fact, these methods do operate in place,
each one of them returning None.

The attached diff (against Doc/lib/libstdtypes.tex,
r41806) fixes this, making it clear that these are
in-place operations.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389673&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1389809 ] Fxn call in _elementtree.c has incorrect signedness

2005-12-24 Thread SourceForge.net
Bugs item #1389809, was opened at 2005-12-24 15:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389809&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Fredrik Lundh (effbot)
Summary: Fxn call in _elementtree.c has incorrect signedness

Initial Comment:
Line 2149 in Modules/_elementtree.c calls
PyUnicode_Decode() with an array of ``unsigned char``
while the definition of the function in
Objects/unicodeobject.c has the argument as ``const
char *``.

Here is the relevant output from the build:

/Users/drifty/Code/Trees/svn/python/trunk/Modules/_elementtree.c:
In function 'expat_unknown_encoding_handler':
/Users/drifty/Code/Trees/svn/python/trunk/Modules/_elementtree.c:2149:
warning: pointer targets in passing argument 1 of
'PyUnicodeUCS2_Decode' differ in signedness

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1389809&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com