<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 18, 2013 at 7:52 AM, Joseph Rushton Wakeling <span dir="ltr"><<a href="mailto:joseph.wakeling@webdrake.net" target="_blank">joseph.wakeling@webdrake.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Sunday, 18 August 2013 at 09:52:29 UTC, Timothee Cour wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
On Sun, Aug 18, 2013 at 2:31 AM, Joseph Rushton Wakeling <<br>
<a href="mailto:joseph.wakeling@webdrake.net" target="_blank">joseph.wakeling@webdrake.net</a>> wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour wrote:<br>
</blockquote></div><div class="im">
granted, that's not ideal. How about the other points I mentioned?<br>
void fun(){<br>
version=A;<br>
version(none):<br>
}<br>
</div></blockquote>
<br>
Not sure I understand what you're trying to achieve there. </blockquote><div><br></div><div>goal1: avoid polluting global module name space:</div><div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">void fun(){</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">version=A;</span><br></div><div><font color="#500050" face="arial, sans-serif">//now the code below in fun() scope has version(A) set</font></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">}</span></div></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div>
<div>goal2:</div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">void fun(){</span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">version(none):</span><br>
</div><div><font color="#500050" face="arial, sans-serif">//all the code below this IN THIS FUNCTION becomes versioned out</font></div><div><font color="#500050" face="arial, sans-serif">//(avoids requiring extra {} scope</font></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.727272033691406px">}</span><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
But as an alternative to function-local import, why not split your module into a package, with submodules mymodule.bardependent and mymodule.nonbardependent ... ?<br>
</blockquote></div><br></div></div>