Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28085
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'socket': 0.05; 'subject:skip:s 10': 0.05; 'line:': 0.07; 'none)': 0.07; 'valueerror:': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tuple': 0.09; 'underlying': 0.09; 'unpack': 0.09; 'bug': 0.10; 'aug': 0.13; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sender:': 0.16; 'subject:broken': 0.16; 'wed,': 0.16; 'documented': 0.17; '>>>': 0.18; '"",': 0.22; '(most': 0.27; 'header:X-Complaints-To:1': 0.28; 'error': 0.30; 'code': 0.31; 'you?': 0.32; 'file': 0.32; 'traceback': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'data,': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'depends': 0.36; "didn't": 0.36; 'method': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'hello,': 0.39; 'header:Received:5': 0.40; 'received:': 0.62; 'world': 0.63; 'more': 0.63; 'behavior': 0.64; 'dennis': 0.91; 'ideas.': 0.91; 'received:108': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: Is socket.recvfrom broken in ActiveState Python 3.2? |
| Date | Wed, 29 Aug 2012 22:22:20 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <cf594a09-d5d2-4d92-912e-b283f4a2fa07@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-108-68-178-177.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3953.1346293361.4697.python-list@python.org> (permalink) |
| Lines | 39 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1346293361 news.xs4all.nl 6898 [2001:888:2000:d::a6]:33607 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:28085 |
Show key headers only | View raw
On Wed, 29 Aug 2012 17:38:28 -0700 (PDT), bbeacham@desanasystems.com
declaimed the following in gmane.comp.python.general:
>
> However, the line 'data, senderAddr = sock.recvfrom(1024)' does not set the 'senderAddr' to anything.
>
No -- if .recvfrom() didn't return a senderAddr you'd get an error
on the tuple unpack...
>>> d, sa = ("string",)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ValueError: need more than 1 value to unpack
> In the code is this line:
> print('RECEIVED:', data, "SENDER:", str(senderAddr))
>
> and this is the output.
> RECEIVED: Hello, world SENDER: None
>
>>> d, sa = ("string", None)
>>> str(sa)
'None'
>>>
So senderAddr was either set to None; or is some object whose
__str__() method returns None... What does repr(senderAddr) give you?
>
> Any ideas. Is this a bug in 'recvfrom'?
Since it is documented that the behavior depends upon the underlying
OS socket implementation, you may need to look at those.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Is socket.recvfrom broken in ActiveState Python 3.2? bbeacham@desanasystems.com - 2012-08-29 17:38 -0700 Re: Is socket.recvfrom broken in ActiveState Python 3.2? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-29 22:22 -0400
csiph-web