Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18132
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.020 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'else:': 0.03; 'flags': 0.05; 'bits': 0.07; 'defaults': 0.07; 'flags,': 0.09; 'am,': 0.12; 'binary': 0.13; '"|"': 0.16; 'omitted,': 0.16; 'set,': 0.16; 'received:74.125.82.44': 0.16; 'received:mail-ww0-f44.google.com': 0.16; 'wed,': 0.17; 'wrote:': 0.18; 'dec': 0.22; '(or': 0.22; 'header:In-Reply-To:1': 0.22; 'subject:use': 0.24; 'all,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'true,': 0.29; '*and*': 0.30; 'yes.': 0.30; "i've": 0.31; 'to:addr:python-list': 0.34; 'received:74.125.82': 0.35; 'something': 0.35; 'supposed': 0.35; 'test': 0.35; 'received:74.125': 0.37; 'received:google.com': 0.37; 'options': 0.37; 'url:en': 0.39; 'url:org': 0.39; 'to:addr:python.org': 0.40; '2011': 0.61; 'here': 0.65; '100': 0.70; 'subject:this': 0.74; '010': 0.84; '10:16': 0.84; '[end': 0.84; '[quote]': 0.84; 'fill,': 0.84; 'quote]': 0.84; 'similar)': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=D+EQGJtKaiBrdnYB6gMolsOapGatZW7y4zq7Ficapoo=; b=wMEZHOcHIucjMgXC9eLLr59SoYfS2zzEQ/WHZY2ld2px8cUdsrGpFS0xdoef2rjCVB 1csiGg34F2LgSJJroKEokOfra5uCzATva3FQEbCsfBWPlOBmV07CaYfhRXJW1fZLpO/s EZqTC5Q8Qt+xMxWMGb+hECgHaO891SCBU7qRk= |
| MIME-Version | 1.0 |
| In-Reply-To | <4efb4f00$0$1393$4fafbaef@reader1.news.tin.it> |
| References | <4efb4f00$0$1393$4fafbaef@reader1.news.tin.it> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Wed, 28 Dec 2011 10:56:58 -0700 |
| Subject | Re: pls explain this flags use |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| 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.4188.1325095051.27778.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1325095051 news.xs4all.nl 6924 [2001:888:2000:d::a6]:38975 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:18132 |
Show key headers only | View raw
On Wed, Dec 28, 2011 at 10:16 AM, Tracubik <affdfsdfdsfsd@b.com> wrote:
> Hi all,
> i've found here (http://python-gtk-3-tutorial.readthedocs.org/en/latest/
> layout.html#table) this code:
>
> [quote]
> If omitted, xoptions and yoptions defaults to
> Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL.
> [end quote]
>
> xoptions have 3 flags: EXPAND, FILL, SHRINK
>
> so, how it is supposed to work?
> it means that by default xoptions is set to EXPAND true, FILL true,
> SHRINK false?
Yes.
> how it work? "|" is used with bits afaik, so i suppouse the xoptions is 3
> bits?
Yes.
> and the default is
> EXPAND FILL SHRINK
> 1 1 0
>
> (or something similar)
>
> so i have
>
> AttachOptions.EXPAND = 100
> AttachOptions.FILL = 010
>
> EXPAND|FILL = 100|010 = 110
>
> is that right?
> so if i want EXPAND *and* FILL i have to make EXPAND *binary or* FILL?
Yes. Binary or is used to set flags, binary and is used to test
whether specific flags are set, e.g.:
if options & AttachOptions.EXPAND:
# do something expandy
else:
# do something not expandy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
pls explain this flags use Tracubik <affdfsdfdsfsd@b.com> - 2011-12-28 17:16 +0000 Re: pls explain this flags use Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-28 10:56 -0700
csiph-web